C-Shell
A simple shell written in C.
|
This header file contains declarations for the internal commands. More...
#include <stdbool.h>
Go to the source code of this file.
Typedefs | |
typedef bool | option |
Functions | |
int | cd (int nargs, char **args) |
Change the shell working directory. | |
int | echo (int nargs, char **args) |
Write arguments to the standard output. | |
int | pwd (int nargs, char **args) |
Print the full filename of the current working directory. | |
This header file contains declarations for the internal commands.
typedef bool option |
int cd | ( | int | nargs, |
char ** | args ) |
Change the shell working directory.
If no path is provided, changes the current directory to /
.
int echo | ( | int | nargs, |
char ** | args ) |
Write arguments to the standard output.
Display the ARGs, separated by a single space character and followed by a newline, on the standard output.
Options:
-c
- separate arguments with commas-n
- no newline at the end-l
- format output as a list int pwd | ( | int | nargs, |
char ** | args ) |
Print the full filename of the current working directory.
If no option is specified, -P is assumed. Option -L
overrides -P
when both are used together.
Options:
-L
- use PWD from environment-P
- resolves symlinks to get the current working directory.