This is a shell implementation project in C. The objective is to have a very good understanding of how the shell interpreter applications and the operating system interact:
- The program has same output as the
/bin/sh
shell - Except difference in program name which is
hsh
- Displays a prompt
$
and waits for a user input. - Executes the command entered by the user.
- Handles error input by printing an error message in the format
PROGNAME: ERRNO: COMMAND: not found
- Implements the
exit
built-in that exits the shell USAGE:exit
- Works in both interactive and non-interactive mode
- Clone this repo into your local machine
cd simple_shell
change directory to the repo
Compile the file using this command
gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh
After compiling, run the exe file created by typing
./hsh
- Afterwards input your commands
To quit the program running, type the exit
built-in command or CTRL + D
$ exit