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
How would you implement each in a class design? Ans) A specialized class "is" a specialization of another class and, thus, has the ISA relationship with the other class. An Em

Disadvantages  1.  The X12 standard is so large and general  2.  EDI communications negotiate a technical agreement to explain exactly what subset of EDI they will use

Difference among the Static rams and dynamic rams. Static RAM: It is costly as each bit of memory will take around 6 CMOS transistors. More speedy as transistors are us

A combinational circuit has 3 inputs A, B, C and output F.  F is true for following input combinations A is False, B is True A is False, C is True A, B, C are

What are the functions of dispatcher? There are four fuctions of dispatcher:- A)  Equal distribution of transaction load to the work processes.  B) Management of buffer a

discuss hypertext mark up language

What is link destruction? Link destruction is inverse of link creation. When a link is destroyed makes sure the associated objects accessible by other handles or intentionally

Differences between internal and external treatment in boiler

Q. How to insert script in dreamweaver? Step 1: Click on Insert Step 2: Click on Script Step 3: Choose the type of Script Step 4: Write the code in "Content" Step 5: T

Question 1: a) What are the phases of video production? b) What do you mean by storyboards? c) What are the differences between Point and Area (or Paragraph) Text?