Minishell is a school 42 project that consists of recreating a basic shell, taking bash as a reference. This project was done by @crigonza and @ipaelo, two students passionate about programming and learning.
The objective of this project is to learn about the functioning of a shell, from reading and analyzing the user input, to executing and controlling the processes. It also aims to develop skills such as code organization, teamwork and use of tools such as git and makefile.
Minishell is able to:
- Read and evaluate simple commands, with their arguments and options.
- Handle environment variables, with the commands
export,unsetandenv. - Execute external programs, looking for them in the
PATHvariable. - Use redirections
<,>and>>, as well as pipes|. - Implement the builtins
echo,cd,pwdandexit. - Manage signals
ctrl-C,ctrl-Dandctrl-\. - Expand variables with
$.
To compile minishell, just clone this repository and run the command make:
git clone https://github.com/crigonza/minishell.git
cd minishell
makeThis will generate an executable called minishell, which can be launched with:
./minishellMinishell works similarly to bash, but with some differences. For example, it does not support special characters \, ;, * or ?. It also does not allow the use of aliases, functions or scripts.
To exit minishell, you can use the command exit or the key combination ctrl-D.
## Examples Here are some examples of using minishell: