A small Unix shell written in C as part of the 42 curriculum.
Minishell replicates basic shell functionality, including command execution, pipes, redirections, and built-in commands.
- Execute commands with arguments
- Built-in commands:
echo,cd,pwdexport,unset,env,exit
- Input/Output redirections:
<,>,>> - Pipes
| - Environment variable expansion
$VAR - Signal handling:
Ctrl+C,Ctrl+D - Optional: heredoc (
<<) support
Example commands:
$ echo "Hello Minishell"
Hello Minishell
$ cd /tmp
$ pwd
/tmp
$ ls -l | grep ".c"
main.c
utils.c
$ export NAME=Kaoutar
$ echo $NAME
Kaoutar
Redirections:
$ echo "Hello" > file.txt
$ cat < file.txt
Hello
$ cat << EOF
> This is heredoc
> EOF
This is heredoc