Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Prints working directory */
- int cmd_pwd(unused struct tokens *tokens)
- {
- char cwd[PATH_MAX];
- char *res = getcwd(cwd, sizeof(cwd));
- if (!res)
- {
- perror(err_msg);
- return -1;
- }
- printf("%s\n", cwd);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement