BigShell is a custom-built command-line shell that emulates core behaviors of a POSIX-compliant shell. It was developed as a senior project to explore advanced system-level programming concepts in C, including process management, I/O redirection, signal handling, and environment variable manipulation.
Note: Due to academic integrity restrictions, source code is not published in this repository. Only compiled binaries, screenshots of test runs, and the final technical report are provided.
- Screenshots: BigShell supports key POSIX shell features including built-ins, job control, pipelines, I/O redirection, and signal handling.
The following categories are demonstrated in annotated test examples:
exitbuilt-in with custom status codes- Variable assignment and
exportto environment - Output redirection (
>), with overwrite protection - Command pipelines using
|(e.g.,echo | sed | cat) - Signal handling (e.g.,
SIGINT,SIGTSTP,SIGTTOU) - Background jobs with
$!tracking
View annotated terminal tests and screenshots:
BigShell_Annotated_Tests.pdf
- Executable Binaries:
release/— optimized builddebug/— debug symbols included
- Documentation:
- Full system report:
BigShell_Report.pdf
- Full system report:
BigShell handles a significant subset of POSIX shell functionality, including:
-
Built-in Commands:
cd,exit,unset,export,pwd,fg,bg,jobs -
External Command Execution:
Run binaries available in$PATH -
Pipelines:
Chain commands using|operator -
I/O Redirection:
Support for<,>,>>,<>,>|,<&,>& -
Environment Variables:
Assignment, export, evaluation ($VAR,${VAR},~expansion) -
Foreground/Background Jobs:
Commands run with;(foreground) or&(background) -
Signal Handling:
InterceptSIGINT,SIGTSTP, and forward signals to child processes
This project was a deep dive into:
- POSIX system calls (
fork,execvp,waitpid,pipe,dup2,kill,tcsetpgrp) - Shell parsing techniques and token expansion
- Job control and process group management
- File descriptor manipulation and redirection
- Debugging with
gdbin a remote server environment
The project includes a Makefile to streamline compilation:
make # Builds both release and debug versions
make release # Builds optimized executable in release/
make debug # Builds debug executable with symbols in debug/
make clean # Removes all build artifacts (release/ and debug/)release/bigshell– Optimized executable (no debug output)debug/bigshell– Debug build with assertions and verbose messages
To run the shell:
cd release/
./bigshellTo debug:
cd debug/
gdb ./bigshellSee the final report: BigShell_Report.pdf
Screenshots: available under docs/screenshots/
.
- release/ # Compiled release version
- debug/ # Compiled debug version with symbols
- docs/
-- CS374_BigShell_Report_113024_v04.docx # Full project report
-- screenshots/ # Images of the shell in action
- README.md # This file
Built with C and grit.
See more projects at https://github.com/Luckygoldjade