This is one of the Ecole 42 common core projects.
It is about implementing a shell (bash) in team of 2 students.
The project is written with holly C language and provides good understanding of processes, file descriptors and popular bash commands.
The final 42_minishell includes:
- Show a prompt when waiting for a new command.
- Have a working History.
- Search and launch the right executable (based on the PATH variable)
- Implemented the builtins:
echowith option -ncdpwdwith no optionsexportwith no optionsunsetwith no optionsenvwith no options or argumentsexitwith no options
โinhibit all interpretation of a sequence of characters."inhibit all interpretation of a sequence of characters except for $.- Redirections:
<redirects input.>redirects output.<<reads input from the current source until a line containing only the delimiter is seen.>>redirects output with append mode.
- Pipes | The output of each command in the pipeline is connected via a pipe to the input of the next command.
- Environment variables ($ followed by characters) expands to their values.
$?expands to the exit status of the most recently executed foreground pipeline.ctrl-Cctrl-Dctrl-\works like in bash.
Full project description you can find in en.subject.pdf.
- installed
clang++ - installed
Makefile
In project directory:
- Run
maketo compile the project. - Execute
./minishellto run 42_minishell. - Try any common bash commands from the list above to test 42_minishell.
- Run
make fcleanto delete all created files.