A shell, but mini.
Minishell is a project from the core curriculum at 42, where the goal is to implement a simple yet functional shell in C. This project focuses on understanding process creation, execution, and synchronization, as well as handling signals and user input efficiently.
The objective is to create a shell that can interpret and execute user commands while following the constraints imposed by the project (limited system functions, strict coding standards, etc.).
- Command execution with arguments (similar to bash)
- Handling of
|
(pipes) for command chaining - Redirections (
<
,>
,>>
,<<
) - Environment variables (
$VAR
expansion) - Built-in commands (
cd
,echo
,pwd
,export
,unset
,env
,exit
) - Signal handling (
Ctrl+C
,Ctrl+D
,Ctrl+\
) - Error handling and status codes
Ensure you have the following installed:
- GNU make
- GCC
- Clone this repository:
git clone --recursive https://github.com/SifexPro/minishell_42
- Navigate to the project directory:
cd minishell
- Compile the project:
make
Once compiled, you can launch Minishell by running:
./minishell
To check for memory leaks, you can use Valgrind:
valgrind --suppressions=readline.supp --leak-check=full --show-leak-kinds=all --trace-children=yes --track-fds=yes
- This project follows the 42 norm, so expect some unconventional formatting.
- Certain standard library functions are restricted, making the implementation more challenging.
- While Minishell aims to be as close to Bash as possible, it is not a full-fledged shell replacement.
- For the full project subject click here.
- You can also check the correction sheet here.