mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
Utilities: Implement pwd
This commit is contained in:
parent
f234c416af
commit
eb65e41a9c
Notes:
sideshowbarker
2024-07-18 09:59:31 +09:00
Author: https://github.com/boricj
Commit: eb65e41a9c
Pull-request: https://github.com/SerenityOS/serenity/pull/8567
Reviewed-by: https://github.com/MaxWipfli ✅
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/gunnarbeutner
1 changed files with 17 additions and 0 deletions
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;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue