Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 1 - Command Line Interpreter Homework is to be completed individually. Send your zipped source code and executable file to me via TITANium Be
Assignment 1 - Command Line Interpreter Homework is to be completed individually. Send your zipped source code and executable file to me via TITANium Be sure to include your name at the top of each source file submitted. For example: // Console Applicationcpp: Simple Command Line Interpreter. Interactive Shell: Write a C/CH program to implement an interactive shell in which users can execute commands. Call this program poxShell. Create an infinite loop (while(i)) that repeatedly prompts the user to enter a command (see example output and input below). Consider using feets) to read a line of input from the user. Before executing the command entered by the user, the command must be compared against the list of supported commands shown here: dir help vo! path tasklist notepad echo color ping Since some commands require more than one argument (e.g. echo, color, ping), you will need to parse the user input into its arguments. Consider using the stitako function. For example: COMMAND TYPED BY THE USER: ping 192.168.1.1 ARGUMENT O: "ping" ARGUMENT 1: "192.168.1.1" If the command in argument[0] is in the list above, your program must execute the command in a child thread via CreateThread). In other words, create a child thread that executes the command. The parent thread waits for the child to terminate. If the user types exit or quit, your shell should simply terminate. Sample output and input are shown below: Welcome to mxShell -> dir Volume in drive C is Windows Volume Serial Number is 301D-8616 Directory of c:\Users\spati\documents visual studio 2015 Projects ConsoleApplicationl\ConsoleApplication!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started