From eb65e41a9cfce7dc8324cd5822bbd31eb522fefe Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Boric Date: Tue, 6 Jul 2021 20:52:19 +0200 Subject: [PATCH] Utilities: Implement pwd --- Userland/Utilities/pwd.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Userland/Utilities/pwd.cpp diff --git a/Userland/Utilities/pwd.cpp b/Userland/Utilities/pwd.cpp new file mode 100644 index 0000000000..43fa05c8b1 --- /dev/null +++ b/Userland/Utilities/pwd.cpp @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2021, the SerenityOS developers. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +int main(int, char**) +{ + char* cwd = getcwd(nullptr, 0); + puts(cwd); + free(cwd); + return 0; +}