MiniShell is a lightweight, minimalistic Unix shell implemented in C. Despite its simplicity, it provides a variety of key features found in more complex shells, making it perfect for users who want a no-frills command-line interface or for educational purposes to understand how a Unix shell operates.
MiniShell includes the following features:
The <, <<, > and >> redirection operators are fully supported, allowing you to redirect input and output from and to files or commands.
Use the | operator to pipe the output of one command to the input of another.
Environment variables can be accessed and modified, providing the ability to store user-defined settings.
The special variable $? can be used to retrieve the exit status of the last executed command.
MiniShell can handle ctrl-D, ctrl-C, and ctrl-\ signals, replicating the functionality of a full-featured shell.
MiniShell includes several built-in commands, including echo, export, unset, cd, pwd, env, and exit.
-
Clone the repository:
git clone git@github.com:maxstocklin/minishell.git minishell
-
Navigate to the cloned repository:
cd minishell -
Compile the program using the provided Makefile:
make
-
Run the shell:
./minishell
From here, you can use the shell just like you would use a standard Unix shell.
MiniShell is an open-source project, and contributions are always welcome! If you have any bug reports, feature requests, or questions, please open an issue on this GitHub repository.