Utilities: Implement pwd

This commit is contained in:
Jean-Baptiste Boric 2021-07-06 20:52:19 +02:00 committed by Andreas Kling
parent f234c416af
commit eb65e41a9c
Notes: sideshowbarker 2024-07-18 09:59:31 +09:00

View File

@ -0,0 +1,17 @@
/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int, char**)
{
char* cwd = getcwd(nullptr, 0);
puts(cwd);
free(cwd);
return 0;
}