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
What are synchronous counters? Design a Mod-5 synchronous counter using J-K Flip-Flops. Ans. Synchronous Counters : It means that all flip-flops are clocked concurrently. T

In order to support IA-32 Itanium can switch in 32-bit mode with special jump escape instructions. IA-32 instructions have been mapped to Itanium's functional units. But as Itanium

Compare and contrast symmetric & asymmetric encryption algorithms. Your response should contain a brief overview of the cryptographic basis for every type of algorithm, and a compa

What is Supply Chain Management? Supply Chain Management: Supply Chain Management involves developing the performance of an organization’s supply chain from its supplier

Part I: 1. The program starts by printing your initial with an end sign ">". For example, "cjx >"; 2. Then, you can type in the following "vi filename". For example, "vi myp.c

Explain various threats posed through servers into a client server environment. Server Destroyed within an Accident: Power failures, Leaking pipes and equipment failures are no

Mr. Franco Forest owns a small lawn care business with three employees. He owns the lawn mowers, rakes, and weed whackers that are housed in a storage area at the back of his home.

In the data parallel model, many of the parallel work focus on performing operations on a data set. The data set is usually organized into a common structure, such as an array or a

Q.What is Canonical and Standard Forms? An algebraic expression can express in two forms: i) Sum of Products   (SOP) for example (A . B¯) + (A¯ . B¯)            ii) Produ

I''m seeking a challenging professional working position in the field of Information Technology,where I’ll be given the chance to enhance & expand the skills & experience