Minishell is a group project developed as part of the 42 School curriculum. The goal of this project is to create a minimal Unix shell that replicates the core behaviors of common Linux shells. This repository showcases a collaborative effort between two students: @artidek and @gvardovski.
This project is an educational exercise designed to deepen our understanding of process management, signal handling, input parsing, and the design of robust C applications. Minishell attempts to mimic the behavior of a standard shell, supporting built-in commands and handling complex user input scenarios.
- Execution of built-in shell commands (
cd,echo,pwd,export,unset,env,exit) - Execution of external programs found in
$PATH - Support for pipes (
|), redirections (>,<,>>,<<) - Environment variable expansion
- Quoting and escaping rules for input parsing
- Signal handling (e.g.,
SIGINT,SIGQUIT) - Custom prompt and command history
- Minimal memory leaks (valgrind clean)
To build Minishell, clone this repository and run:
git clone https://github.com/artidek/42_minishell.git
cd 42_minishell
makeRequirements:
- GNU Make
- GCC (or compatible C compiler)
- GNU Readline library
- Standard Linux environment
After building, launch the shell with:
./minishellYou will be greeted by a prompt. From there, you can type commands as you would in a standard shell.
echo "Hello, World!"
export PATH="/usr/bin"
ls -l | grep minishell
cat < infile | grep foo > outfilemain.c— Entry point of the shellbuiltins/— Implementation of built-in commandscommand_processor/— Parsing and execution of command sequences and redirectionsexpand/— Variable and parameter expansion logicincludes/— Header files and public structuresinput_processor/— Input handling and prompt logiclibft/— Custom C library functions (as required by 42 school)utils/— Utility functions and helpers
Other files:
Makefile— Build instructionsms.subject.pdf— 42 project subject specification
Note: Directory listing may be incomplete. For the full list, see the repository contents.
This project follows the 42 School collaboration policy and is developed by two students as a mandatory group assignment. Contributions outside of the original team are not accepted.
This project is intended for educational purposes and does not currently include a specific license. Please refer to the 42 School policy regarding code reuse and sharing.
Project repository: https://github.com/artidek/42_minishell