mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-17 13:17:33 +00:00
Utilities: Implement pwd
This commit is contained in:
committed by
Andreas Kling
parent
f234c416af
commit
eb65e41a9c
17
Userland/Utilities/pwd.cpp
Normal file
17
Userland/Utilities/pwd.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user