Minishell is a 42 school project that challenges you to recreate a simplified UNIX shell. This implementation supports pipes, redirections, environment variables, and other essential shell features - all while being limited to a select group of standard functions.
Realized by Androlink && WaRtr0
Command | Options Supported |
---|---|
echo |
-n (no newline) |
cd |
Relative/Absolute paths |
pwd |
No options |
export |
Variable assignment |
unset |
Variable removal |
env |
No arguments |
exit |
Exit with status code |
Operator | Example |
---|---|
< (Input) |
grep 'test' < file.txt |
> (Output) |
ls > output.txt |
>> (Append) |
echo "text" >> file.txt |
<< (Here doc) |
cat << LIMITER |
| (Pipe) |
ls | grep .c |
&& (And) |
make && ./app |
|| (Or) |
invalid_cmd || echo "Error" |
() (Grouping) |
(ls || echo Fail) && echo Done |
- Handles unclosed quotes/multiline commands
- Ctrl+C: New prompt on fresh line
- Ctrl+D: Clean exit
- Non-blocking Ctrl+\
- Clone with submodules:
git clone --recursive https://github.com/WaRtr0/Minishell.git cd Minishell
- Build:
make -k
- Run:
./minishell
- Limited functions
- Only 1 global variable allowed
- Strict 42 norm
- Zero memory leaks