A simple Unix shell written in C
-
Open the terminal and clone the repositories:
git clone https://github.com/BaaniLeen/My_Shell.git
-
Change the directory into the src of My_Shell:
cd My_Shell/src/
-
Execute the Makefile
make
-
Run the Shell
./shell
Welcome to My_Shell!
-
Supports:
i.
cd
: Change DirectoryOptions-
.. : Go to the parent directory -P : Cd into the absolute path
ii.
echo
: Output the given argumentsOptions-
-n : Do not print the trailing newline -E : Ignores escape characters and treats it as a part of the string only
iii.
history
: Prints the history of commands typed in the current shell sessionOptions-
-c : Clear the history list by deleting all of the entries -d offset : Delete the history entry at offset OFFSET.
iv.
pwd
: Print Current Working DirectoryOptions-
-L : Use PWD from environment, even if it contains symlinks --help: Help display this help and exit
v.
exit
: Exiti.
ls
: List directoryOptions-
-a : List all (including hidden) files and directories -A : List everything except . and ..
ii.
cat
: Read the following filesOptions-
-u : Disable output buffering -n : Number lines in the output
iii.
rm
: Remove fileOptions-
-f : Force removal. Do not give any errors if encountered -i : Interactive. Ask before removing any file
iv.
date
: Show the date in various formatsOptions-
-d "Jan 9" : Print date from the given string --v : Give version output
v.
mkdir
: Make a directoryOptions-
-v : verbose directory making (tell whatever mkdir is currently doing) --help : print help