JShell is a Unix Shell emulator application written in Java and run through terminal. It provides functionality of main commands of Unix Shell, has it's own mock file system tree (where each node is file or directory), and capable of displaying appropriate error messages if not used properly.
This is a Maven project. To install and run the application (assuming Maven is installed) open terminal at any folder and type
foo@bar:~$ git clone https://github.com/sashavoit/JShell
foo@bar:~$ cd JShell
foo@bar:~$ mvn -q compile
foo@bar:~$ mvn exec:java
Project was developed in a team of four following Agile Scrum as using SVN version control. Overall team had 5 sprints. Here you can find product backlog, sprint backlogs, and complete log of daily SCRUM meetings. Here's also a complete set of CRC cards for each Java class and interface.
Any command that has an output supports redirection to a file. Use > to overwrite contents of the file and >> to append.
foo@bar:~$ COMMAND ARGUMENTS > FILE
foo@bar:~$ COMMAND ARGUMENTS >> FILE
foo@bar:~$ man COMMAND
Prints out the documentation for a given COMMAND into the shell. Outputs error if COMMAND does not exist.
foo@bar:~$ mkdir DIRECTORY...
Creates directory(ies) at given full or relative path(s).
foo@bar:~$ cd DIRECTORY
Change current working directory to given directory.
foo@bar:~$ ls [-R] [DIRECTORY/FILE]...
List contents of DIRECTORY, or a location of FILE. If no directory provided, print contents of current working directory.
Options:
- -R list contents recursively
foo@bar:~$ echo "STRING"
Outputs STRING. STRING must be surrounded by double quotes.
foo@bar:~$ cat FILE...
Outputs concatenation of contents of the file(s).
foo@bar:~$ exit
End session of JShell.
foo@bar:~$ mv SOURCE DEST
Move file or directory at SOURCE to location at DEST.
foo@bar:~$ cp SOURCE DEST
Copy file or directory at SOURCE to location at DEST.
foo@bar:~$ rm DIRECTORY
Deletes directory and all it's contents recursively.
foo@bar:~$ pushd DIRECTORY
Pushes DIRECTORY onto a directory stack in memory.
foo@bar:~$ pushd
Changes current working to last directory from the directory stack in memory.
foo@bar:~$ pwd
Prints full path to current working directory.
foo@bar:~$ history [N]
Prints history of N last commands entered by user (including history command itself). If number N is not provided, print full history.
foo@bar:~$ tree
Prints file system tree starting at root directory recursively.
foo@bar:~$ save FILE
Saves state of the JShell to FILE on the real hard drive of the computer. Can be loaded in the next session.
foo@bar:~$ load FILE
Loads the state of the JShell from FILE on the real hard drive of the computer. Must be the first command after the start of the sesion.
foo@bar:~$ find PATH... -type TYPE -name "NAME"
Looks for node of type TYPE (d or f) with name NAME at location(s) specified by PATH(s).
foo@bar:~$ curl URL
Retrieves a file from URL and saves it to current working directory.
This project was developed as part of CSCB07 Software Design course and University of Toronto. Team of developers:
- Raz Ben Haim
- Kevin Meharchand
- Sankalp Sharma
- Sasha Voitovych (me)