Minishell is a project from 42 School that involves creating a simple yet functional shell in C. The goal of this project is to gain a deeper understanding of how shells work and to develop advanced programming skills in C.
- Execution of basic commands (e.g.,
ls
,echo
,cat
, etc.) - Input and output redirection (
>
,>>
,<
) - Pipes (
|
) - Environment variables
- Signal handling and process management
- Support for built-in commands like
cd
,export
,unset
,env
,exit
- Unix-based operating system (Linux or macOS)
- GCC compiler
- Readline library (optional for advanced functionality)
-
Clone the repository:
git clone https://github.com/pablovilchez/42-minishell.git
-
Navigate to the project directory:
cd minishell
-
Compile the project:
make
Run the shell by executing the following command:
./minishell
cd [directory]
: Change the current directory.export [variable]=[value]
: Set an environment variable.unset [variable]
: Remove an environment variable.env
: Display the current environment variables.exit [status]
: Exit the shell with a status code.
$ ./minishell
minishell> ls -l
total 8
-rwxr-xr-x 1 user group 4096 Jun 12 12:00 minishell
minishell> echo "Hello, World!"
Hello, World!
minishell> cat < file.txt | grep "search" > output.txt
minishell> exit
$
- Gabriela - github.com/gkrusta
This project is licensed under the MIT License.
- Thanks to 42 School for the project guidelines and support.
- Special thanks to my teammate Gabriela for his incredible effort, hard work, and for putting up with me throughout the project.