This project has been created as part of the 42 curriculum by pbindl, whuth.
minishell is a lightweight Unix shell implementation written in C. The goal is to understand how a shell works at a fundamental level. From reading user input to parsing commands, expanding variables, handling redirections, and executing processes.
The shell supports:
- Command execution via
PATHresolution and absolute/relative paths - Pipelines (
|) connecting multiple commands - Input and output redirections (
<,>,>>,<<) - Environment variable expansion (
$VAR,$?) - Single and double quote handling
- The following builtins:
echo,cd,pwd,export,unset,env,exit - Signal handling (
Ctrl+C,Ctrl+D,Ctrl+\)
- GCC or Clang
- GNU Make
- readline library (
libreadline-devon Debian/Ubuntu)
makeThis produces the minishell binary in the project root.
./minishellThe shell will display a prompt with the current working directory. Type commands as you would in any Unix shell. Exit with exit or Ctrl+D.
- Bash Reference Manual — authoritative reference for shell behaviour and edge cases
- The Linux Programming Interface — Michael Kerrisk; comprehensive reference for Linux system calls
AI was used for testing the project.
All code was written, understood, and validated by the authors. AI was not used to generate submitted code directly.