Bash-like Shell
Status: Complete | Last Updated: 2008/06/25 | Author(s): stt@sfu.ca
This minishell offers basic shell operations (commands) as well PATH variable and jobs support (fg/bg/job).
The shell takes in a line of user input after prompting the user and parses the line. You may include multiple commands separated by ; or &, the latter which implies the command preceding the & will run in the background with the provided arguments separated by a space. Multiple commands are executed sequentially from left to right and should the user provide a line which contains bad formatting, the shell will indicate the error and will not execute any command in the line (like BASH).
If you need to include a space in your arguments, you may (like BASH) either escape the space (ex. foo\ foo [note the slash]), or put the argument in quotations (ex. "foo foo").
For jobs run in the background, a job number will be assigned to the resulting process ID created for the command. You can check the status of your background processes (jobs) by typing in the command "jobs". Furthermore, any changes in the process' state will be indicated on next prompt. (in the same format as BASH: [n] [proc id] [status], where n is the job number, proc id is the process number, and status is stopped, started or done.). Jobs can be moved to the foreground by using the fg command and stopped jobs can be resumed in the background using the bg command. To suspend a process (like BASH) you press ctrl+z.
CMPT 300 Assignment 1 written in C. A debug mode can be enabled by typing in "debug" in the shell. Source code will be provided only on request.