Minishell is one of the largest project in 42 School. It took us almost 2 months to evaluate the project. But we learnt so much through out this time. Also this is our first team project. Through this project we learnt how computer executes a command, how proccesses work, how some builtins (echo , export etc.) works , how signal works and so on. We learnt how to contribute and split problems with others on the same project, share ideas and knowledge and eventually come up with solution. Overall it's a full-stack , real-world, useful, sometimes stressful and very intersting project.
- Command Execution: Execute commands entered by the user.
- Built-in Commands: Supports built-in commands such as
cd,pwd,echo,export,unset,exitetc. - Input/Output Redirection: Supports input/output redirection using
<and>operators. - Heredoc/Append Mode: Supports heredoc and append using
<<and>>operators. - Pipeline Commands: Supports chaining multiple commands together using the
|operator. - Signal Handling: Handles signals such as
Ctrl+Cfor interrupt andCtrl+Dfor exit.
-
Clone the repository:
https://github.com/sumon-ohid/42-minishell.git -
Navigate to the project directory:
cd minishell -
Compile the source code:
make -
Run Minishell:
./minishell
Here are some examples of commands you can run:
-
Executing a command:
ls -l -
Changing directory:
cd /path/to/directory -
Redirecting input/output:
cat input.txt > output.txt -
Chaining commands:
ls -l | grep "file"
Feel free to modify and distribute it according to your needs. !!!! Please don't use it directly for 42 School projects !!!!