This is a simple shell program written in C. It allows you to execute shell commands, set and unset environment variables, and exit the shell. The shell provides a basic command-line interface for interacting with your system.
- Ubuntu 20.04 LTS
- GCC with options: -Wall -Werror -Wextra -pedantic -std=gnu89
- C Standard Library
-
Compilation:
To compile the shell, use the following command:
gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh
-
Running the Shell:
To run the shell, execute the compiled binary:
./hsh
-
Shell Commands:
The shell supports the following commands:
- Shell commands (e.g.,
ls
,pwd
) - Set environment variables (e.g.,
setenv VARIABLE VALUE
) - Unset environment variables (e.g.,
unsetenv VARIABLE
) - Exit the shell (e.g.,
exit
orexit STATUS
)
- Shell commands (e.g.,