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
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

What are RDRAM? RDRAM are Rambus DRAM. Rambus needs specially designed memory chips. These chips use cell arrays based on the standard DRAM technology. Multiple banks of cell a

Q. Explain Simple Interfacing? The following is a sample of the coding, used for procedure interfacing: PUBLIC CUROFF             _TEXT SEGMENT WORD PUBLIC 'CODE'

Explain dissimilar security protocols used for e-commerce applications.   The e-commerce systems of today are composed of a number of components including: a commerce server, d

Explain the importance of computer architecture Studying the architecture implies working on machine language programs. However, this isn't practical when we design a computer

Define cache line. Cache block is used to refer to a set of contiguous address location of some size. Cache block is also referred to as cache line.

What are difference between latches and flipflops? Difference : Latches are level-sensitive, while, flipflops is edge sensitive. It means to say edge sensitive that O/p change

Define bus A group of lines that serves as a connecting path for various devices is known as a bus.

Three dissimilar types of convergences are: 1.  The convergence of e-commerce and wireless technology  2.  The Convergence of E-Commerce and IP Business-Grade Messaging 3

design a gray to bcd code converter using 16:1 de multiplexe