Completed

Write a C++ program to implement an interactive shell in which users can execute commands.

Write a C++ program to implement an interactive shell in which users can execute commands.

Call this program myShell.

Create an infinite loop (while(1)) that repeatedly prompts the user to enter a command (see example output and input below). Use fgets() 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

vol

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 strtok() function.

For example:

COMMAND TYPED BY THE USER:

ping [login to view URL]

ARGUMENT 0: "ping"

ARGUMENT 1: "[login to view URL]"

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 myShell

==> dir

Volume in drive C is Windows

Volume Serial Number is 301D-8616

Directory of c:\Users\johnwoates\documents\visual studio 2015\Projects\ConsoleApplication1\ConsoleApplication1

08/27/2016 08:59 AM <DIR> .

08/27/2016 08:59 AM <DIR> ..

08/27/2016 08:59 AM 1,686 [login to view URL]

08/25/2016 05:42 PM 8,060 [login to view URL]

08/25/2016 05:42 PM 1,346 [login to view URL]

08/27/2016 09:00 AM <DIR> Debug

08/25/2016 05:42 PM 1,799 [login to view URL]

08/25/2016 05:42 PM 306 [login to view URL]

08/25/2016 05:42 PM 320 stdafx.h

08/25/2016 05:42 PM 314 targetver.h

7 File(s) 13,831 bytes

3 Dir(s) 526,080,049,152 bytes free

==> ping [login to view URL]

Pinging [login to view URL] with 32 bytes of data:

Reply from [login to view URL]: bytes=32 time=2ms TTL=64

Reply from [login to view URL]: bytes=32 time=1ms TTL=64

Reply from [login to view URL]: bytes=32 time=3ms TTL=64

Reply from [login to view URL]: bytes=32 time=4ms TTL=64

Ping statistics for [login to view URL]:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 1ms, Maximum = 4ms, Average = 2ms

==> exit

Thanks for using myShell!

Assumptions:

Assume arguments within myShell do not contain spaces. In other words, don't worry about parsing out quoted strings in your argument list ([login to view URL] [login to view URL] "some [login to view URL]").

You may assume that no more than four arguments will be used on the command line (i.e. similar to argv[0], argv[1], argv[2], and argv[3]).

Skills: C++ Programming, C Programming, C# Programming, Software Architecture, Java

See more: write java program asks users enter, write complete java program implement towers hanoi problem, write program implement integers digit arrays, write program implement single source shortest path problem, write program implement circular linked list, write program implement fleury, implement class write test program creates points, write language program implement multithreaded matrix multiplication, write program implement multithreading language, write program implement lru page replacement algorithm, write program implement arq, implement a parser that processes sequences of correctly paired ifs and elses in a c program, write a c program to accept 10 or more numbers then display the numbers in two columns one column with the numbers as they were , write a C program, write a c++ program to accept 10 or more numbers then: display the numbers in two columns: one column with the numbers as they w, write c program online, write c program, write a c program to implement memory management using segmentation, write a c++ program to implement rsa algorithm, c program to swap two numbers using functions call by value

About the Employer:
( 0 reviews ) Irvine, United States

Project ID: #24075927

Awarded to:

VileGnosis

I can make this simple shell application in C++. My average project completion time is within 3-5 hours on the same day. The skills I have include PHP, HTML5, CSS3, JavaScript, jQuery, WordPress Themes & Plugins, Web S More

$30 USD in 1 day
(229 Reviews)
7.0