-
Notifications
You must be signed in to change notification settings - Fork 1
Home
MSH is a minimalistic shell that provides a simple command-line interface for interacting with your operating system. This section will guide you through the process of downloading, building and using MSH on your system.
Before using MSH, ensure you have the following prerequisites installed on your system:
You have two options, either install it globally or use it from the projects folder
-
Clone the Repository:
git clone https://github.com/nanafox/simple_shell.git cd simple_shell
-
Build MSH (Limited to the folder):
make
This command will compile the source code and generate the
msh
executable.
OR
-
Install MSH(Globally):
This script will install
sudo bash install.sh
msh
on the system at/usr/bin/msh
so you can access it from anywhere.
If you used this method, you'll execute withmsh
, you don't need the full path.
-
Run MSH:
./msh
-
Execute Commands: Enter commands directly into the shell prompt and press
Enter
to execute.ls -l cd /path/to/directory echo "Hello, MSH!"
-
Exit MSH: To exit the shell, use the
exit
command.
MSH supports several advanced features:
-
Alias Commands:
alias cls='clear' alias md='mkdir' unalias cls
-
Logical Operators:
command1 && command2 command1 || command3
-
Environment Variables:
setenv MY_VARIABLE my_value unsetenv MY_VARIABLE
-
File as Input:
./msh script.txt
-
Variable Expansion:
echo "Process ID: $$" command echo "Exit Status: $?"
-
Command Separator (;):
command1 ; command2
-
Custom Env
env
If you encounter any issues or have questions, refer to the Issues section on the GitHub repository. Feel free to open a new issue if your problem hasn't been addressed.