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
Q. What do you eman by Processors Hypercube? This is precise to in the hypercube. Every processor is portrayed by set of nodes of graph and different arcs are represented with

Program Level : It is the next level consisting of independent programs for parallelism. Coarse Granularity  size is used at this level containing ten thousands of instructions.

Q. What is Dot Pitch of a CRT? Dot Pitch of a CRT is the distance between phosphor dots of same colour. In Trinitron screens, the term Slot Pitch is used in place of Dot Pitch

What are the exceptions encountered for FP operation? The exceptions encountered for FP operation are overflow, underflow. /0, inexact and invalid values.

Initial thought process: Design a script which was simple and user friendly.  Integrate procedures/functions to extract data under the hood.  I focused on giving the user the o

What are the different phases of consumer mercantile model? There are three different phase of consumer mercantile model like listed as in below: • Pre-purchase interaction

Classify Scheduler. Scheduler is a kernel function decide which method  be  thought to be implemented by the processor: the scheduler scans the list of processes in the ready s

What is the use of hypertext links in Internet access? Use of Hypertext links in Internet access: From the user’s view point, the Web comprised a vast, worldwide collecti

Throughput of a system is? Ans. "Throughput" of a system is no. of programs processed by this per unit time.

As demonstrated in a simple manner in my Animated Tiles example, the purpose of this assignment is to use jQuery animations to develop a simple puzzle using DIV tags and styles. C