This project has been created as part of the 42 curriculum by saouissi, rpinheir
Minishell is a 42 group project where the main goal is to build a simplified shell, in comparison with bash. In global we must execute programs from PATH variable, code ourselves built-ins programs like cd, echo or env. Within the scope, we manage pipes, redirections, Posix signals like SIGINT (CTRL+C), build history based on recent inputs. There is also a environment cloning where we must manage environment variables, and so also using '$?' to get the exit status of the most recent execution and be able to expand variables with character '$'.
There is also a less visible task is to build, how we manage the prompt (the user inputs). The manner we've decided to do is the following: Input -> readline() -> lexer -> tokens -> parser -> struct with linked lists -> execution. Technical details will be listed later.
To build the project:
makeTo run it you can either:
make runor
./minishellFeel free to test with those examples:
ls -lacat README.md | grep "Instructions"cat << eof > here.log | cat here.log | grep "$USER"
USER
$USER
eof- 42 Docs - Minishell -- community docs, each step detailed
- Minishell: Building a mini-bash -- 42 student, lexer -> parser -> executor flow
- Mastering Minishell -- comprehensive guide
- Intro to Parsing & Lexing -- basics for beginners
- Shell parsing tips -- shell parser in detail
- Bash guide on expansion/substituition
- Bash Shell Operation In Depth -- how bash processes a command
- Build a simple shell in C -- shell from scratch
- Code crafters -- non 42 project that is also very close to what we have to do
- ANSI Escape codes
- Minishell color palette
