Minishell è un progetto della Scuola 42 che consiste nell'implementare una miniatura di una shell Unix, scritta interamente in C. L'obiettivo è comprendere a fondo il funzionamento di una shell, la gestione dei processi, delle pipe, delle variabili d'ambiente, e del parsing degli input utente.
- Creare un prompt interattivo che riceve comandi da tastiera.
- Eseguire comandi semplici e concatenati (es: ls -l | grep txt).
- Quote singole e doppie
- Redirezioni e .heredoc (>, <, >>, <<)
- Pipe
- Variabili d’ambiente
- Built-in (es: cd, echo, export, unset, exit)
- Gestione dei segnali (Ctrl+C, Ctrl+)
- Eseguire comandi esterni tramite execve.
- Parsing complesso e gestione degli errori
- Processi, fork e file descriptor
- Costruzione e manipolazione di AST o strutture simili
- Buona padronanza di C e gestione della memoria
- Comprensione del comportamento reale di una shell
- $
make - $
./minishellentri nella shell - $ Ctrl+D o
exitper uscire - $
make fclean
Minishell is a project from 42 School that consists of implementing
a miniature version of a Unix shell, entirely written in C. The goal
is to deeply understand how a shell works, including the handling of
processes, pipes, environment variables, and user input parsing.
- Create an interactive prompt that receives keyboard commands.
- Execute simple and chained commands (e.g.: ls -l | grep txt).
- Single and double quotes
- Redirections and .heredoc (>, <, >>, <<)
- Pipes
- Environment variables
- Built-ins (e.g.: cd, echo, export, unset, exit)
- Signal handling (Ctrl+C, Ctrl+)
- Execute external commands via execve
- Complex parsing and error handling
- Processes, fork, and file descriptors
- Building and managing AST or similar structures
- Solid understanding of C and memory management
- Real shell behavior comprehension
- $
make - $
./minishellto enter the shell - $ Ctrl+D or
exitto exit - $
make fclean