https://github.com/sugimotothomas/smallsh
A bash-like shell application written in C.
https://github.com/sugimotothomas/smallsh
c exec shell signal-processing
Last synced: about 2 months ago
JSON representation
A bash-like shell application written in C.
- Host: GitHub
- URL: https://github.com/sugimotothomas/smallsh
- Owner: sugimotothomas
- License: mit
- Created: 2020-12-15T17:34:50.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-15T17:41:48.000Z (over 5 years ago)
- Last Synced: 2025-08-17T03:38:43.458Z (11 months ago)
- Topics: c, exec, shell, signal-processing
- Language: C
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Assignment 3: smallsh (Portfolio Assignment)
By: Thomas Sugimoto
sugimoth@oregonstate.edu
CS 344 Operating Systems Fall 2020
11/3/2020
smallsh.c
A bash-like shell application written in C.
- Provides a prompt for running commands
- Handles blank lines and comments, which are lines beginning
with the # character
- Provides expansion for the variable $$
- Executes 3 commands exit, cd, and status via code built into
the shell
- Executes other commands by creating new processes using a function
from the exec family of functions
- Supports input and output redirection
- Supports running commands in foreground and background processes
- Implements custom handlers for 2 signals, SIGINT and SIGTSTP
## Installation
To compile and run simply go to the directory with the smallsh.c
file and run the commands:
gcc -o smallsh smallsh.c
./smallsh