Simple and well-commented shell written in C for Linux. For exploration deeper into the metal.
- Basic commands:
exit
,pwd
,clear
andcd
- Environment management with
setenv
andunsetenv
- Program invocation with forking and child processes
- I/O redirection (use of
dup2
system call) limited to the following:
<cmd> <args> > <output>
<cmd> <args> < <input> > <output>
- Background execution of programs with
&
- Piping implemented (
<cmd1> | <cmd2>
) viapipe
anddup2
syscalls. Multiple piping is allowed. - SIGINT signal when Ctrl-C is pressed (shell is not exited)
- Run
make
at the root directory then./c-shell
to start the shell.