Write a C or C++ program which acts as a simple shell: it repeatedly prints a prompt, reads a command line from stdin, and executes it.
It should have a couple of built-in commands
(at least "cd", "exit", and some way to assign environment variables),
and it should be able to run any program in the standard system paths
(so you've got
g++, etc.). You may use the C
function to sent the command to the Bourne shell for execution.
Your shell should also use some environment variables (e.g.
use a variable named
PROMPT to control the command prompt).