The Mumsh Shell is a basic command-line shell built using C, designed to provide essential features found in standard Unix shells such as bash
and sh
. The shell supports features like:
- Command Execution: Supports simple commands like
ls
,cat
, andecho
. - Input/Output Redirection: Supports redirecting input and output using symbols such as
>
and<
. - Pipelining: Allows chaining multiple commands with
|
, connecting the output of one command to the input of another. - Built-in Commands: Includes support for basic shell commands like:
cd
: Change directorypwd
: Print current working directory
- Signal Handling: Gracefully handles interrupts such as
Ctrl-C
without terminating the shell unexpectedly. - Handling Quotes in Commands: The shell supports single (
'
) and double ("
) quotes.
Ensure that you have the necessary development tools installed:
sudo apt update
sudo apt install clang make gcc
- Clone the repository
git clone [email protected]:bsuvonov/mumsh.git
- Navigate to the project directory and build the shell. You can use the Makefile:
cd mumsh
make
This will generate two executables: mumsh and mumsh_memory_check.
- Run the shell:
./mumsh
Testing is important to ensure that the shell behaves correctly under various conditions. You can test the shell manually by running a variety of commands with different combinations of redirection, piping, and built-in commands. Automated testing scripts can also be used by giving input through STDIN and analyzing the result printed to STDOUT of the program.
The program is tested by school's online judge and got full scores for all testcases.