Implemented a shell program with low-level Unix/POSIX system calls in November 2017 at Stony Brook University.

Author

All works were solely done by Wonyong Jeong except the base code that is designed under the course CSE320: System Fundamentals II led by Professor Jeniffer Wong-Ma and Professor Eugene Stark.

NOTE: If you are a student in such a class, you should not copy (or copy then modify) this code without permission.

Description

A wyjeong-shell which supports command-lines with low-level Unix/POSIX system calls related to processes, files, and interprocess communication (pipes and redirection) has implemented.

Builtins

Supports the following builtins.

Executables

wyjeong_shell supports any executables, such as ls, grep, and cat.

Redirection

Supports redirection syntax that uses three special characters: < for input redirection, > for output redirection, and | for piping.

Job Control

Supports a subset of the Bash’s job control tools as follows:

NOTE: wyjeong_shell also supports Job Control + Piped Processes.

Background Processesing

Supports background processing:

Scripting

Supports both interactive commands as well as reading commands from a file via IO redirection. Both scenarios are similar, however, when reading commands from a file, the shell should not print its prompt.

$ wyjeong_shell < testcmds.sf

OR

$ cat testcmds.sf | wyjeong_shell

In this scenario, testcmds.sf would be a series of commands separated by new line characters, like so:

help
ls
cd /
pwd
ls -al home
cd -
cat < testcmds.sf
ping google.com -c 2 | tr '[:lower:]' '[:upper:]'
exit

Source Code

Source code will be public on my github accout soon.