Minishell is a simple shell implementation project created as part of the 42 school curriculum. This project involves building a minimal, functional shell with a subset of features found in common UNIX shells like bash or zsh.
Minishell is designed to mimic the behavior of the Bash shell, allowing users to interact with the command line, execute commands, and manage environment variables. The goal is to develop a deeper understanding of process management, pipes, redirection, and UNIX signals.
- Interactive prompt where users can type commands.
- Supports simple command execution and command chaining with pipes (
|). - Input/output redirection (
>,>>,<). - Signal handling for
Ctrl+C,Ctrl+D, andCtrl+\. - Environment variable management with
export,unset, etc. - Built-in commands like
cd,pwd,echo, and more. - Error handling for command not found or invalid syntax.
To build and run the minishell, follow these steps:
- Clone the repository:
git clone https://github.com/MatriX1232/minishell.git- Navigate to the project directory:
cd minishell- Build the project:
make- Run the shell:
./minishellOnce the shell is running, you will be presented with a prompt where you can type and execute commands. You can use both built-in commands and external programs.
^_^ minishell ▶ pwd
/home/msolinsk/42Warsaw/Core_Curriculum/minishell
^_^ minishell ▶ export MY_VAR=HELL
^_^ minishell ▶ echo "Welcome to programming $MY_VAR."
Welcome to programming HELL.
^_^ minishell ▶ ls
LICENSE Makefile include libft minishell src
^_^ minishell ▶ unset
>︿< minishell ▶ Usage: unset <variable>
^_^ minishell ▶Exiting the Shell
You can exit the minishell by typing exit or using Ctrl+D.
This project was developed as an group project in colaboration with idomagal

