Author: nefari0uss
Simple UNIX shell with history. This shell run's a process that reads the user input then creates a seperate child process to perform the command.
The parent process will then wait for the child to finish execution before continuing unless explicitly told to run in the background. The child process
created using the fork()
system call. The command is executed using the exec()
from a system call.
- Run
$ make
to compile. - Run
$ ./shell
. exit
orquit
will end the program.- Running the shell a second time will allow it to read from the history file (if one exists).
- Enter commands to run.
h
will display the history.r
can be used to invoke a command in the history.- If a command is repeated, only the latest call is kept in the history.