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
Examples of declarations of external variables  that  are  not definitions: extern char stack[10]; extern int stkptr; These declarations tell the compiler that the variab

What guarantees the integration of all application modules? The R/3 basis system guarantees the integration of all application modules.  The R/3 basis s/w gives the run time e

Q. Evaluation Stack Architecture? A stack is a data structure which implements Last-In-First-Out (LIFO) access policy. You can add an entry to the with a PUSH(value) as well as

Q. Concurrently read concurrently write? It is one of the models derived from PRAM. In this model the processors access the memory locations simultaneously for reading and writ

What are advantages and disadvantages of TTL gates design with Wired-AND connection ? Ans. Advantages and disadvantages In this IC added logic is performed with

Write a program that computes the minimum and maximum of elements in an array in Assembly 8086.

What are the two ways of constructing a larger module to mount flash chips on a small card? The two ways are:- a) Flash cards b) Flash drivers.

how create database design for pharmacy by diagram and query

Although there are no compulsory "c" compiler for this subject, but the compiler we are going to use for this example is the Mingw32 compiler. Download the source code files fro

1. Conduct a literature survey of advanced applications of the finite element method for engineering design and analysis. 2. Identify at least one application, which interests y