This is a simple UNIX command line interpreter implemented in C. It provides a basic shell environment where users can execute commands.
Simple_shell is designed to run in the Ubuntu 14.04 LTS
linux environment and to be compiled using the GNU compiler collection v. gcc 4.8.4
with flags -Wall, -Werror, -Wextra, and -pedantic
.
Do you need clone this repository:
git clone https://github.com/saad484/Simple-Shell
And then you can compile with this command:
gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
After the compilation you can excecute with this command:
./hsh
- Compile the program to create the
hsh
executable file (see instructions above). - Run the executable as follows
./hsh
- Enter basic commands like:
ls
, you can add flags along withls
command such as-l
,-la
(ls -l
,ls -la
) - Press enter after entering the command
- To end the execution of the
simple_shell
program pressctrl + d
or write the wordexit
$ ./hsh
($) /bin/ls
hsh main.c shell.c
($)
($) exit
$
$ echo "/bin/ls" | ./hsh
hsh main.c shell.c test_ls_2
$