Developed by Dimitrios Karageorgiou,
during the course Operating Systems,
Aristotle University Of Thessaloniki, Greece,
2017-2018.
Crush, is a Linux shell that implements basic functionality expected of a shell.
Crush stands for "Completely Rubbish Shell", a funny title, though perfectly describing the real world usages of this shell. After all, at least at this stage, it is not intended as a project to create an everyday shell.
It is intended for providing a minimal implementation of core concepts used in a shell, useful for everyone who wants to start implementing a shell from scratch or who wants to understand some fundamental concepts.
The straightforward way to compile is the following:
make
In order to compile a compiler that supports gnu11 C standard is required.
Crush can be invoked in interactive mode, i.e. the mode where commands are read one by one from the user, either by directly calling the executable or utilizing a shorthand in Makefile as following:
Direct executable call: ./bin/crush
Makefile shorthand: make run
Crush can also be used to run shell scripts that utilize the functionality it implements. Like interactive mode, it can be done by either providing the script as first argument to the executable, or by using a Makefile shorthand as following:
Direct executable call: ./bin/crush <path_to_shell_script>
Makefile shorthand: make run_batch script=<path_to_shell_script>
- Invoking commands either by their absolute/relative path or by searching for appropriate executables in PATH environment variable.
- Passing an arbitrary number of arguments to commands, separated by an arbitrary number of spaces.
- Defining arguments that contain whitespaces.
- Defining multiple commands in a line separated by
;
. - Creating chains of commands using
&&
operator. - Simple built-in commands such as cd, quit, etc.
- Define comments right after '#' character.
- Various error messages.
More detail about Crush features can be found in README.txt
.
This project is licensed under GNU GPL v3.0.