Minishell is a simple Unix shell emulator written in C language
Project done in collaboration with dzhoka
The goal of the project is to recreate a simplified version of a Unix shell, capable of interpreting and executing basic shell commands and handling various features such as environment variables, redirection, pipes, and signal handling.
- Display a prompt when waiting for a new command
- Command Execution:
- Ability to execute commands entered by the user
- History:
- Implement command history functionality
- Built-in Commands:
- Implementation of built-in shell commands such as
- cd with only a relative or absolute path
- echo with option -n
- pwd with no options
- export with no options
- unset with no options
- env with no options or arguments
- exit with no options
- Redirection:
- Support for input and output redirection (<, >, >>) and heredoc (<<)
- Pipes:
- Handling of pipe (|) operations for connecting multiple commands
- The exit status:
- Handling $? which should expand to the exit status of the most recently executed foreground pipeline
- Environment Variables:
- Management of environment variables and their manipulation (export, unset)
- ’ (single quotes - prevent from interpreting meta-characters in quoted sequence)
- " (double quotes - prevent from interpreting meta-characters in quoted sequence except for $)
- Signal Handling:
- Handling of signals such as ctrl-C, ctrl-D and ctrl-\ which should behave like in bash
- Error Handling:
- Provide informative error messages for user commands
- Clone the repository:
git clone git@github.com:lh-lena/minishell.git minishell
- Navigate to the project directory:
cd minishell
- Compile the project:
make
- Run the Minishell:
./minishell or make run
make
ormake all
- compiles minishellmake clean
- wipes all object filesmake fclean
- deletes minishell and all object filesmake re
- fclean + allmake run
- allows project execution without memory leak caused by readline
<<<<<<< Updated upstream
=======
- The project must be written in C
- function no longer 25 lines
Stashed changes