- To complile the program, run
make - To execute the executable thus created, run
./shell - use the
quitcommand to exit the shell - You can run
make cleanon your terminal to remove executables generated by make
Builtins:
lsls -lls -als -lals -al
echocdcd <dir_path>
pwdpinfopinfo <pid>
clearclock -t <interval>remindme <duration> <message>quitsetenv <var> <value>unsetenv <var>overkilljobskjob <jobNumber> <signalNumber>fg <jobNumber>bg <jobNumber>
- Redirection operators:
>output redirection (overwrite)>>output redirection (append)<input redirection
|Piping operator- Note: The piping operator can be used in combination with the redirection operators
Ctrl + Ckills the current foreground proccess.Ctrl + Zsends a foreground process to background and changes it's state to Stopped.- All other terminal commands are excuted using fork.
- Processes can be run in foreground or background in this C - shell. To run in background, simply add an '&' to the end of a command.
For example:gedit &will open gedit in the background, which allows us to continue using the shell. - The user will be notified when a background process ends (including exit status).