Command Line Shell

C

Operating Systems

GitHub

Summary

This project was created for my Operating Systems class at the University of San Francisco.

The goal of this project was to implement a functional command line shell. The project was coded all in C and required several weeks to implement and debug all the features. Some of the features implemented are: Scripting and Executable Scripts, Built-in Commands, History, I/O Redirection, and Background Jobs.

Scripting and Executable Scripts

The shell can execute commands input through the command line or through a script. Scripts allow many commands to be prepared ahead of time.

Built-in Commands

The shell supports several built in commands. Using the '!' character, commands can be run from the history list. '!!' reruns the last input command.

History

Input commands are saved into a history list that can be paged through using the up and down arrow keys. Commands from the history list can be executed again.

I/O Redirection

The shell supports input and output redirection as well as piping. I/O redirection and piping allow multiple commands to be linked together by using the output of one function and the input for the next.

Background Jobs

The shell will interpret commands ending in '&' as a background task and execute them in the background.