In this project, it was developed a simplified shell that allows users to interact with the operating system through a command-line interface. The goal is to implement core features of a shell, including command execution, built-in commands, input/output redirection, and the use of pipes. Inside this repository, you can see all the code that has been created for the Minishell project, including the mandatory part and the bonus part. The project was done in collaboration with Giovanna Coqueiro
Create a program that works like a shell, following the next conditions.
- Display a prompt when waiting for a new command
- Have a working history
- Search and launch the right executable(using relative path, absolute path or just the the name of the command)
- Handle '
- Handle "
- Implement redirections: '<', '>', '<<', '>>'
- Implemente pipes
- Handle environment variables
- Handle exit status with $?
- Handle signals: 'ctrl-C', 'ctrl-\', 'ctrl-D'
- Implement builtins: 'cd', 'pwd', 'echo', 'exit', 'unset', 'export, 'env'
you can run it with:
./minishell
Bonus | Status |
---|---|
Manage '||' and '&&' with parenthesis | not implemented |
Manage wildcards | not implemented |
Manage variables expansion inside ' and " | implemented |
Clone this repository in you local computer using a terminal:
git clone [email protected]:beatrizdile/42sp-minishell.git
After cloning the project in your local reposiory you can run some commands you can find in Makefile:
- $> make all: or just make compiles the project
- $> make clean: deletes the object files created during compilation
- $> make fclean: executes the clean command and also deletes the binary created
- $> make re: executes the fclean command followed by the all command
- $> make bonus: compiles the project
- $> make rebonus: executes the fclean command followed by the rebonus command
- $> make run: executes all and run the program
- $> make val: executes all and run the program with valgrind