Minishell is a project from the 2nd phase of the common core of 42 School.
The goal of this project was to create a Shell similar to bash, using only C.
*the code has been tested only on Linux
git clone https://github.com/a-cs/minishell.git
cd minishell
sudo apt-get install libreadline-dev
make
./minishell
*To watch the video, click on the gif.
commands | description |
---|---|
echo | Print the arguments to the standart output. *Accepts the -n flag. |
cd | Change the shell working directory. |
pwd | Print the current working directory. |
export | Export variables to shell. |
unset | Delete variable of the shell. |
env | Print the environment. |
exit | Exit the shell |
- Execute linux commands
- Handle environment variables and $?
- Handle double quotes
- Handle single quotes
- Handle redirects
- Handle pipes
- Handle Crtl + C, Crtl + D and Crtl + \ like bash
- History