Objective
The Objective of the project is to write a shell in Java. The
Shell will run the commands typed at the command prompt.
Team of sstudents who worked on this project
Sunil, Madhav, Tapan
List of the commands supported by the Shell
cat
writes the contents of the
files to the standard output
clear
clears the screen
cd
changes the directory with
respect to the current directory
cp
makes a copy of the file
date
prints the date
dir
gives a detailed listing
of the files in the directory
echo
wirtes the parameters of
this command to the standard output
exit
exits the shell
grep
searches for a pattern in
the files and prints the lines which matched the pattern
help
gives a help on a command
ls
gives a listing of all files
in the directory
mem
gives the total memory available
to the java runtime system and the amount of free memory
mkdir
creates a subdirectory with
the given name
mv
moves the source file to
the destination file
prompt
changes the prompt to the
specified string
pwd
prints the current working
directory
rm
deletes given files from
the current directory
time
gives the current system
time
wc
gives the count of number
of lines, words and characters in a file
version
prints the current version
of the shell
pipe
pipe ( | ) is not really
a command, It is a way of joining two commands togeather. It is similer
to unix pipe.
These are the following interfaces defined:
These files contain
only decleration of methods. Detais can be found by looking the source
file itself.
JShell.java
This is the main file .
It creates the main frame and the text area for the console. It parses
the commands, if it is the internal command it will execute that., otherwise
it loads the class corresponding to a command and executes .
The classes implementing
the shell commands will write to System.out. This class provides a way
to capture that stream and redirects to the text area.
ls.java | cat.java | mkdir.java | mv.java | rm.java |
time.java | wc.java | cd.java | cp.java | date.java | dir.java | echo.java | grep.java | GrepInputStream.java | mem.java | prompt.java |