https://github.com/hekoh99/minishell
The Minishell project is a custom implementation of a Unix shell, similar to popular shells like zsh or bash. It supports several essential shell features, including redirection, piping, built-in commands, and signal handling. This shell allows users to execute commands, manage file redirection, and handle signals efficiently, simulating the behavior of a standard shell environment.
<
, >
, and >>
operators.<<
operator.|
symbol for piping and parallel command execution.echo
cd
pwd
env
exit
Ctrl + C
: Interrupts the running command.Ctrl + \\\\
: Quits the current process.Here are some example commands to demonstrate Minishell in action:
# Example 1: Simple redirection
echo "Hello World" > output.txt
# Example 2: Append output using >>
echo "This will be appended" >> output.txt
# Example 3: Input redirection
cat < input.txt
# Example 4: Piping
ls -l | grep minishell
# Example 5: Heredoc
cat << EOF
This is a heredoc example
EOF
# Example 6: Using built-in commands
pwd
cd /path/to/directory
echo "Current path: $(pwd)"
env
exit