Simple Shell implementation
##Introduction The Shell or Command Line Interpreter is a fundamental User Interface to an Operating System.
####Features
-
cd Changes the current default directory to . If the argument is not present, the current directory is reported. If the directory doesn’t exist an appropriate error message is reported. This command also changes the PWD environment variable.
-
clr Clears the screen.
-
dir Lists the contents of directory .
-
environ Lists all the environment strings.
-
echo Display on the display followed by a new line. ( Multiple spaces/tabs are reduced to a single space).
-
pause Pause Operation of shell until ‘Enter ’ is pressed.
-
help Displays User Manual.
-
quit Quits the shell.
-
The shell environment contains shell=/myshell where /myshell is full path for the shell executable (not a hardwired path back to your directory, but the one from which it was executed).
-
The shell is be able to take its command line input from a file. That is, if the command line is invoked with a command line argument: myshell batchfile then batchfile is assumed to contain a set of command lines for the shell to process. When the endoffile is reached, the shell exits.
####How To Use
-
Just compile the main.c with gcc.
-
Run the program and the shell is ready to be used.