Welcome to our minishell! This project was completed by cmunoz-g and jjuanramos.
For the deepest context about the project, we recommend reading maiadegraaf's README: it is explained so incredibly well we thought it's redundant to re-do it.
Still, If you want to dive straight in, the summary is that this project aims to recreate a mini version of bash.
The requirements are:
- Have a functional history of all previous commands.
- Run the right executable based on PATH or relative and absolute paths.
- Implement redirections such as <, >, «, and ».
- Implement pipes (|).
- Handle environment variables.
- Handle $?.
- Handle signals such as ctrl-C, ctrl-D, and ctrl-.
- Implement the built-ins: echo, cd, pwd, export, unset, env, and exit (except echo and cd, all of them without arguments).
- Make sure there are no leaks.
In order to execute minishell, you will need gcc
installed. You'll probably have it installed by default, otherwise, we recommend you head to GNU's website and install it.
With that out of the way, the steps needed to execute minishell are:
- Cloning the repo:
git clone git@github.com:cmunoz-g/minishell.git
cd minishell
make
./minishell
That should be it! It's been tested on Linux and MacOs.
Get creative! Some examples are:
cat | cat | cat | echo << end
ls -la | wc -c >> out.txt
cat < out.txt
echo $PATH >> out.txt
export a=HELLO
echo $HELLO
echo '$HELLO'
And more! The heuristic is that, as long as the commands fit the requirements, they should behave as bash.