Question: Write a program in C which functions as a DOS command interpreter. DOS uses the commands cd, dir, type, del, ren, and copy to do

Write a program in C which functions as a DOS command interpreter. DOS uses the commands cd, dir, type, del, ren, and copy to do the same functions as the UNIX commands cd, ls, cat, rm, mv, and cp. Your program loops continuously, allowing the user to type in DOS commands, which are stored in the variables commandarg1 and arg2. The command should be considered by a case statement, which executes an appropriate UNIX command, depending on which DOS command has been given. The program should echo the following instruction to the user: Type Ctrl-C to exit.

Step by Step Solution

3.41 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a basic implementation in C that interprets DOS commands cd dir type del ren and copy and maps them ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!