Minishell is a simplified Unix shell implemented in C, inspired by Bash. This project is part of the 42 Network curriculum and focuses on understanding processes, file descriptors, and signal handling.
Minishell replicates the behavior of a basic shell with the following functionalities:
- Interactive Shell: Displays a prompt while waiting for a command.
- Command Execution: Runs executables using the PATH environment variable.
- Quoting Handling: Supports single (') and double (") quotes.
- Redirections:
- < redirects input.
- > edirects output.
- << (here-document) reads input until a specified delimiter.
- >> appends output to a file.
- Pipes (|****): Connects multiple commands in a pipeline.
- Environment Variables: Expands variables ($VAR) and supports $? for the last exit status.
- Built-in Commands:
- echo (with -n option)
- cd (relative or absolute path)
- pwd
- export
- unset
- env
- exit
- Signal Handling:
- Ctrl+C displays a new prompt.
- Ctrl+D exits the shell.
- *Ctrl+* does nothing in interactive mode.
- Logical operators (&& and ||) with parentheses for priority handling.
- Wildcard expansion (*) for pattern matching in the current directory.
- Clone the repository:
git clone https://github.com/ychbily/minishell.git- Compile the project:
make./minishellCompleted as part of the curriculum at 1337 School in Khouribga, Morocco, achieving a perfect score of 125/125.