This project is a minimal Unix shell implementation in C, commonly known as "minishell." A shell is a command-line interface that allows users to interact with an operating system. This minishell provides basic shell functionalities, allowing users to execute commands, navigate directories, and manage processes.
You must have gcc compiler and readline libraries installed
- Command Execution: Execute various shell commands and programs.
- Built-in Commands: Implement built-in shell commands like
cd,exit, andhelp. - Input/Output Redirection: Support input and output redirection using
<,<<,>>and>operators. - Piping: Enable command piping using the
|operator. - Signal Handling: Handle signals like Ctrl+C and Ctrl+D and Ctrl+.
-
Compilation: Compile the minishell program using a C compiler like gcc.
make
-
Execution: Run the compiled minishell executable.
./minishell
-
Shell Commands:
- Basic Commands: Enter standard shell commands like
ls,pwd, etc. - Built-in Commands:
cd [directory]: Change current directory.exit: Exit the minishell.help: Display help information.
- Redirection: Use
<,<<,>>and>for input and output redirection.cat < input.txt > output.txt
- Piping: Use
|for command piping.command1 | command2
- Basic Commands: Enter standard shell commands like