Write your own Basic Shell
Write a basic shell program, which when run, prints its prompt and waits for input from the user. When the user types something and presses ENTER, it accepts the input and tries to execute whatever the command given. If the command cannot be found, it prints the error Command Not Found. Otherwise, it executes and prints the output of the command. Remember that a shell does a fork() and exec() to execute the command given. You need to do the same. You need to be able to accept any command line arguments given for the command and pass them to exec(), just as a shell program does.
If the program segment faults or results in zombie processes or hangs, you will lose marks accordingly.
Please refer to the previous page on Assignment submission policy. Also, read the coding guidelines given below and follow them. Any code which does not follow the coding guidelines is likely to lose marks.
Please read the Coding Guidelines and make sure you follow these guidelines.
Use gcc -Wall as the compile command in your Makefiles.