diff options
Diffstat (limited to 'toys/pwd.c')
-rw-r--r-- | toys/pwd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toys/pwd.c b/toys/pwd.c new file mode 100644 index 00000000..3ba7ae0d --- /dev/null +++ b/toys/pwd.c @@ -0,0 +1,16 @@ +/* vi: set sw=4 ts=4: */ +/* + * pwd.c - Print working directory. + */ + +#include "toys.h" + +int pwd_main(void) +{ + char *pwd = xgetcwd(); + + puts(pwd); + if (CFG_TOYS_FREE) free(pwd); + + return 0; +} |