Shell_SH
Yet another POSIX complaint shell , that can be used as a command interpreter.
C++
Linux

Shell_SH
Shell_SH, is a Unix shell based on POSIX standards which can be used as a command interpreter.
Features
The shell comes with all the typical features included inside any shell interpreter , some of them are:
- Custom colored prompts like bash shell.
- Handles all errors gracefully.
- Common internal shell commands (Ex:
exit, cd, clear
) are supported. - Can execute binaries available in the path environment variable.
- Supports complex pipes commands.
- Supports background task using (&) operators.
Getting Started
Before starting make sure you are running Linux or similar , which can be linux based OS itself , VMware virtual machine or WSL.
Clone the project repository
git clone https://github.com/himanshu12345yadav/shell_sh.git
cd shell_sh
To get started with Shell_SH, you need to install the necessary build tools. The build tools include necessary libraries , build tools , compilers etc to build the project.
You can do this by running the following command:
apt install build-essential
Once you have installed the build tools, you can start the build process by running the following command which starts the make
build tool and generate a executable binary in the same directory.
make
After the build process has completed, you can run the Shell_SH executable by entering the following command:
Note: If the file is not executable you can try
chmod u+x ./shell.out
Then run the file you will eventually enter in SHELL_SH shell.
./shell.out
To exit the shell, and move to your previous shell you can use the exit
command or terminate the shell process using Ctrl+C
(Terminate Signal).
Usage
Shell_SH can be used as a command interpreter to execute various Unix commands. For example, you can use the ls
command to list files and directories in the current working directory:
ls -lah
- You can also use Shell_SH to execute shell scripts.
For example
, if you have a shell script namedmy_script.sh
, you can execute it using the following command`.
./my_script.sh
- You can also execute all the binary presents in the path variable and use the pipe for interprocess communication.
curl -X GET https://www.google.com --head | sed 's/server/Google-Server/' | grep Google-Server
- You can use the background (&) operator to push the process in background
ping -c 5 google.com &
To check the process running in background.
htop
License
This software is licensed under the MIT License.