Smallsh is a custom shell program written in C, mimicking fundamental functionalities of standard Unix shells. It's designed to execute commands in both interactive and non-interactive modes, handle expansions, manage background processes, and incorporate custom signal handling.
- Interactive and Non-Interactive Modes: Run commands directly or via a script file.
- Command Execution: Built-in standard Unix commands: "cd, exit"
- Background Process Management: Ability to run processes in the background.
- Signal Handling: Custom handling of SIGINT and SIGTSTP.
- Input Redirection: Support for input redirection using '<'.
- Output Redirection: Support for output redirection using '>'.
-
Clone the repository:
git clone https://github.com/YazeedT/smallsh
-
Navigate to the cloned directory:
cd smallsh
-
Compile the program using the provided Makefile:
make
-
Run the shell in interactive mode:
./smallsh
-
Run the shell in non-interactive mode (script mode):
./smallsh scriptname
- exit: Exits the shell.
- cd: Changes the current working directory.