Accept commands from the user, Computer Engineering

Your shell must accept commands from the user. The first step to implement this will be reading a line of input. This section will focus on what to do with the line of input after it is read. A command will consist of the name or path to the command, followed by zero or more arguments separated by white spaces. For this assignment, we will define white space as one or more space characters. Here is an example of a command with arguments:

l s  - a l

In this argument _ls_ will be the command and _-al_ is the first and only argument. To allow proper formatting the commands, we will put these commands into an array of char*. So, the first element of the array should be _ls_, and the second element should be _-al_. To parse the commands, we suggest using the strtok function from string.h. You can use just a space (" ") as the lone delimiter. Remember to consider the case where the user does not enter any command and hits the enter key. Your shell should simply print the prompt again on a new line.

Posted Date: 4/3/2013 2:54:53 AM | Location : United States







Related Discussions:- Accept commands from the user, Assignment Help, Ask Question on Accept commands from the user, Get Answer, Expert's Help, Accept commands from the user Discussions

Write discussion on Accept commands from the user
Your posts are moderated
Related Questions
Translate the following sentences into predicate logic, using Russell's theory of definite descriptions to represent the article the. a. The wizzard of Oz fell. b. Everyone a

What is asynchronous transmission An asynchronous transmission technique used in many interactive terminals employ special bits. With this method each character consists of thr

An accessor is a class operation that does not change the state of an object in C++. The access or functions require to be declared as const operations

Blue Sky events is an organisation that devices and runs large outdoor events. They have been commissioned to organise and run an event for four months over the summer period in a

MIPS' native assembly code only has two branch instructions, beq and bne, and only one comparison instruction, slt. Using just these three instructions (along with the ori instruct

Which device consume minimum power ? Ans. Minimum power consume by CMOS as in its one p-MOS and one n-MOS transistors are connected in complimentary mode, so one device is ON a

What are different EDI components and EDI services? Different EDI components and EDI services are illustrated as: Three main components including services in EDI System are

Cache coherence refers to the integrity of data stored in local caches of a shared resource. Cache coherence is a special case of memory coherence. When clients in a system, mainly

Q. Explain about parallel programming environment? The parallel programming environment comprises of a debugger, an editor, performance evaluator, programme visualizer for incr

Q. How to calculate register indirect addressing? The effective address of operand in this technique is calculated as: EA= (R) and D = (EA)  Address capability of regi