Small Shell is a simple shell program that can execute commands, handle input/output redirection, and manage background processes.
Compile program using C compiler: gcc -std=c99 -D_XOPEN_SOURCE -g main.c -o smallsh
./smallsh
Executes commands entered by the user. Handles input/output redirection using < and > symbols. Manages background processes with the & symbol. Supports built-in commands: cd: Change directory. status: Print the exit status of the last executed command. exit: Exit the shell. Ignores SIGINT (Ctrl+C) when in foreground mode. Toggles between foreground-only mode and normal mode with SIGTSTP (Ctrl+Z).
The shell accepts commands entered by the user. Each command can contain multiple arguments separated by spaces. The following special symbols are supported:
'<' : Input redirection. Redirects input from a file.
'>' : Output redirection. Redirects output to a file.
'&' : Background execution. Executes a command in the background.
change directory
prints the exit status of the last executed command
exit the shell
Mainoah Zander Muna