This is a fork of the Minishell project, originally developed by Kartik and Aaron as part of the School 42 curriculum. It implements a basic Unix shell with functionalities such as command execution, built-in commands, environment variable handling, pipes, redirections, and signal handling.
The project aims to provide a deeper understanding of system programming concepts, including process management, memory handling, and the usage of Unix system calls.
This version of Minishell implements the mandatory part of the project subject, and the features include:
-
Interactive Shell:
- The shell runs in an interactive mode, displaying a prompt and waiting for user commands.
-
Command Execution:
- Execute binaries in the
$PATH(e.g.,ls,echo,cat) with arguments.
- Execute binaries in the
-
Built-in Commands:
echo(with-noption)cdpwdexportunsetenvexit
-
Environment Variables:
- Manage and expand environment variables during execution.
-
Pipes (
|):- Support for simple pipelines between commands.
-
Redirections:
- Input redirection (
<), output redirection (>), and append redirection (>>).
- Input redirection (
-
Signal Handling:
- Handle
Ctrl+C,Ctrl+D, andCtrl+\gracefully without quitting the shell.
- Handle
-
Error Handling:
- Display meaningful error messages for invalid commands, permission issues, and syntax errors.
To compile and run Minishell, ensure you have:
- A Unix-based operating system (Linux or macOS)
gccor another C compilermake
- Clone the repository:
git clone https://github.com/Deblish/minishell.git cd minishell