A minimalistic shell written in C that supports some basic shell features.
- Commands can be run in the background by adding & to the end of the line
- Input/Output redirection using < and >
- $$ expands to the current PID
- Supports PATH based command lookups
- SIGTSTP (Ctrl + z) is used to toggle whether background commands are accepted
- SIGINT (Ctrl + c) is used to kill the current running command. It does not kill SmallShell or background processes
- A line starting with a # is a comment and will be ignored
These commands are built in to the shell, all others will run using execvp()
status
returns the previous commands exit codecd
changes the current working directoryexit
exits the shell
- Make
- POSIX-compatible system
git clone https://github.com/CrazyheadJake/SmallShell.git
make
./smallsh