mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03: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: https://github.com/SerenityOS/serenity/commit/eb65e41a9cf 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
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…
Reference in New Issue
Block a user