Objective

You are going to create your very own Operating System! This project is just a warmup to get you comfortable with C/C++, as well as getting you comfortable with how these projects will be structured and the expectations. Your operating system is going to be a pure CLI (Command Line Interface) or a shell as its commonly known, and the goal is to make it mimic the commands you can run in a Linux terminal (with some minor changes). Below you will find a list of commands you have to implement with an explanation next to them.

Requirements

Command Description
pwd display the current working directory
echo prints any extra arguments to screen
ls Displays all files and folders in the current working directory. You do not have to pass any arguments for this.
help Displays a list of all commands available in your program. This should also inform the user if a command accepts arguments or not.
exit quits the program

Your program will read in input given by the user, parse the input for commands, execute the commands, and then return to the user for their next input. Your program does not have to execute commands that do not exist within your program. For example if I try to run the command ("cat README.txt") you can throw an error informing the user "The command [cat] does not exist." After you throw the error, return to the user for their next input.

Your program must be able to run multiple commands on a single line. We will use ";" to separate commands. For example your code should be able to execute the following command (Cpwd; Is; echo banana; exit") which will...

  • display the file path of your current directory
  • display the contents of your current directory
  • echo "banana" to the screen
  • exit the program
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.