This project is about creating a shell, where our shell will do some basic operations such as changing directories, handling pipes, redirections, and some other commands.
We called our shell Martho because it comes from our intra names, hamalmar and mthodi where we took Mar from hamal(Mar) and Tho from m(Tho)di.
Special thanks to ii-mnwr for being my project partner.
- Basic Shell Operations: Execute commands like
ls
,echo
,pwd
, etc. - Change Directories: Use
cd
to navigate through the file system. - Pipes: Handle pipes (
|
) to connect multiple commands. - Redirections: Support input (
<
), output (>
), append (>>
) and heredoc (<<
) redirections. - Built-in Commands: Implement built-in commands like
cd
,echo
,pwd
,export
,unset
,env
, andexit
. - Environment Variables: Manage and expand environment variables.
- Signal Handling: Properly handle signals like
Ctrl+C
,Ctrl+D
andCtrl+\
.
To get started with Minishell, follow these steps:
-
Clone the repository:
git clone https://github.com/AlmarzooqiH/Minishell.git cd Minishell
-
Compile the project:
make
-
Run the shell:
./minishell
Here are some examples of how to use Minishell:
-
Basic Commands:
Martho shell# ls -la Martho shell# echo "Hello, World!"
-
Change Directory:
Martho shell# cd /path/to/directory
-
Pipes:
Martho shell# ls -la | grep minishell
-
Redirections:
Martho shell# echo "Hello, World!" > output.txt Martho shell# cat < input.txt