This project was carried out as part of an academic project for Operating Systems 5. It's a simple yet functional shell that supports job control.
This is a non exhaustive list of the features of our shell:
- Built-in commands:
cd
,exit
,jobs
,fg
,bg
,kill
and?
(environment variables are not updated, so this is the same asecho $?
) - Redirections:
>
,>|
,>>
,2>
,2>|
,2>>
,<
- Pipelines:
|
- Command substitution:
<()
- Background jobs:
&
- Job control
This project requires gcc
and make
to be installed on your system, along with the readline
library.
It should run on any Linux distribution, but it's sadly not POSIX
compliant,
we use the proc
virtual filesystem to get some pieces of information about the processes
and for named pipes, maybe one day we'll change that, should be fun.
For those of you who are interested on running the tests, you will need valgrind
installed on your system (explained later).
To compile the project, execute the command
make
or
make jsh
To run the project, execute the following command after compiling it
./jsh
You can run the tests using the following commands, some may require valgrind
to be installed and some may
take a while to run (should be less than 2 minutes).
make test-unit # our unit tests
make test-valgrind # our unit tests with valgrind
make test-tyy # our tests using the professors' framework
make test-professor # our professors' test framework
make test # all the tests
You can see the project's formal specification in the project.md file.
We have also written a small report on our architecture and the choices we made, you can find it in the ARCHITECTURE.md file.
See AUTHORS.md