The minishell project is a basic shell program created as part of 42 School. It replicates essential features of a Unix shell, including executing commands, handling pipes and redirections, and managing environment variables. This project is an introduction to the world of system programming, process creation, and signal handling in C, giving students insight into how a shell operates internally.
To compile and execute minishell, you will need to install readline library.
If you are on macOS, make sure you have installed Xcode Command Line Tools and Homebrew.
- Linux
sudo apt install libreadline-dev- macOS
brew install readlineOnce readline is installed, you can continue with the following steps.
- Clone this repository
git clone https://github.com/extrymes/42-Minishell.git
cd 42-Minishell- Compile and launch the program
make
./minishell- Running executables located in
PATHenvironment variable. - Running built-in commands like
echo,cd,pwd,export,unset,env, andexit. - Handling pipe (
|), heredoc (<<) and redirections (<,>,>>). - Handling environment variables like bash.
- Handling signals
CTRL-C,CTRL-D, andCTRL-\like bash.
We welcome contributions from everyone! Whether you're fixing bugs, adding new features, improving documentation, or simply sharing your ideas, your input is greatly appreciated.
Thanks for visiting and happy coding!
