Write a shell in C (or, if you really want, Lex; I expect you to write
homework 5 in lex anyway).
assigned 14 Nov, due 26 Nov (postponed to 3 Dec)
The shell should print a prompt, allow the user to type any ordinary
Unix command, possibly with arguments, run that command until it
finishes, print another prompt, run another command, and so on until the
user types the special command "exit". You are not required to handle
I/O redirection, pipes, semicolons, environment variable expansion (e.g.
"$TERM"), file completion, wildcard filenames, or the "~" directory
Other things I'd like you to do in this version
- The shell prompt should be the current value of the environment
variable "PROMPT", with some appropriate default if that variable is
- The user should be able to define environment variables by typing,
e.g, "setenv PROMPT=hello!" or "setenv NAME=Bloch"
- Implement a "cd" command to change directories. (Note that this
can't be done by calling a separate program.)
Fri Nov 29 14:22:00 EST 1996
Stephen Bloch / email@example.com