Assigned 13 Nov, due 8 Dec (NOT 1 Dec!) In this assignment you are to write a shell. Of course, some shells do a lot of fancy tricks, and some don't. The minimal assignment is as follows: Your program will print out a prompt and read in a command line. It will then break up the command line into "words". If the first word is "exit", your program will stop. Otherwise, it will treat the first word as the name of a program to be run, and the rest of the words as arguments to be given to that program. Your program will fork a subprocess, which runs the specified program with the specified arguments; the main process will wait for the subprocess to finish before printing another prompt. There are a variety of additional features you can add to your shell for extra credit. Some are fairly easy, and are worth a little bit of extra credit; some are much more difficult and worth more credit. In rough order from easiest to hardest,... 1) use not a fixed prompt, but rather the current value of the PROMPT environment variable. 2) implement the "cd" command (which can't be done by forking a subprocess and running a program; I'll explain why if you wish). 3) implement the "setenv" command (which also can't be done by forking a subprocess and running a program, for reasons I've already explained). 4) recognize ";" or "&", allowing multiple commands on one line. 5) recognize "<" and ">", allowing the user to redirect I/O. 6) recognize "|", allowing user-specified pipes. 7) expand the names of environment variables preceded with "$" into the values of those variables, wherever they appear in the command line. (Consider what happens if the value of the variable contains multiple words, or if it contains ";", "&", or "|" characters.) I recommend doing only one of "<"/">", ";", "&", and "|", because if you do more than one, you have to worry about which one takes precedence over the others. A large part of your task is picking the command line apart into words. This will be a lot easier with a tool named "lex", which I'll talk about in class in a few days.