The minishell project is a simple Unix shell implementation, designed to handle commands and execute them with basic functionality. It aims to develop a deeper understanding of how shells work and how they interact with the operating system. The challenge involves building a shell from scratch, supporting key features such as piping, redirection, and environment variable management.
- Implement a basic Unix shell using system calls.
- Handle command execution, environment variables, and redirection.
- Implement piping and process control.
- Ensure proper parsing of commands and their arguments.
- Implement built-in commands like
cd,echo,exit, andpwd. - Handle signals and error management.
-
Command Parsing: The shell reads the input, parses it, and identifies the command, its arguments, and any redirection or pipes.
-
Command Execution: Executes the parsed commands using
execve, with support for built-in functions likecdandecho. -
Pipes and Redirection: Implements piping (
|) and input/output redirection (>,<). -
Environment Variables: Manages and updates environment variables with
getenv,setenv, andunsetenv. -
Signals Handling: Properly handles
SIGINTandSIGQUITsignals to ensure smooth operation. -
Error Handling: Provides informative error messages and ensures robustness in handling invalid commands and arguments.
The minishell project is an essential challenge that helps understand the inner workings of shells, the process management system, and how to handle user input and execute commands efficiently. It provides hands-on experience with core system calls and reinforces concepts like parsing, environment management, and signals.
✅ Final Grade: 100/100 Project made at 42 Lisboa 👤 Author: Stephan Rodrigues Lassaponari (@Stezsz)