Program accepts any command line unix shell command from stdin and produces the corresponding output to stdout. It supports to run shell commands in the foreground as well as in the background (e.g.,“ls &”). In addition, it also supports changing directories, “pipe” command (e.g., “ls | wc”) and multiple commands in one line separated by “;” (e.g., “ls; ps;”). Shell program will exit when user types “exit”.
libreadline-dev
sudo apt-get install libreadline-dev
gcc shell_swapnil.c -o shell_swapnil -lreadline
Adding support for multiple pipe and "&" command (greater than two).