This project is part of the 42 School curriculum. Minishell is a simple Unix shell implementation in C that replicates key features of Bash.
β Command parsing (with quotes, special characters)
β
Built-in commands (cd, echo, pwd, export, unset, env, exit)
β Execution of external programs using PATH
β
Pipes (|) and redirections (>, <, >>, <<)
β Environment variable handling
β Custom prompt display
β
Command history (without using read_history())
git clone git@github.com:elinakly/minishell42.git
cd minishell42
make./minishellYouβll see a custom prompt where you can run commands like:
ls -la | grep minishellecho $HOMEcat file.txt > out.txt
- Only allowed to use specific system calls and standard library functions
- Must handle signals (CTRL+C, CTRL+) properly
- Built-in commands must work with and without pipes
minishell/
βββ src/ # source files
βββ include/ # header files
βββ lib/ # libraries (if any)
βββ Makefile
- Building a shell from scratch
- Process management (fork, exec, wait)
- File descriptors and pipes
- Signal handling
- Memory management and avoiding leaks
- Linked lists for command management