This project was created for 42 cursus by kevlim and ssabound
Minishell is a project that recreates a shell in C. The goal is to simulate the behavior of a UNIX shell like Bash, while implementing specific features such as pipes, redirections, environment variable expansion, and built-in commands.
- Built-ins:
echo— prints a message. The-noption prevents adding a newline.cd— changes the current directory.pwd— prints the current working directory.export— sets an environment variable.unset— deletes an environment variable.env— displays all environment variables.exit— exits the shell.
- Redirections:
<— redirects standard input from a file.>— redirects standard output to a file.<<— reads input until a specific delimiter is found (heredoc).>>— redirects standard output in append mode.
- Pipes: Manages data flow between multiple commands using
|. - Quotes: Handles single (
') and double (") quotes with metacharacter protection. - Exit status: Handles
$?expansion.
The project uses a Makefile to compilation:
make./minishell- Remove object files :
make clean - Remove object files and executable :
make fclean - Recompile from scratch:
make re
For this project we used especially documentation and the peer learning and used AI to understand diffrent concepts. Links we used :