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
a. What is the difference among character and block devices? b. Discuss the method to make a Kernel Driver for the PC Speaker. c. Explain the socket structure with the help o

Q. Show Independent loops in fortran program? In the subsequent code portion the directives point to the outer two loops are independent. The inner loop allocates elements of A

NetDynamics Application Server was the primary Java-based integrated software platform. The product was developed by NetDynamics Inc. As Java became the dominant development langua

The maximum number of dimensions an array can have in C is C permits arrays of three or more dimensions. The exact limit is examined by the compiler.

Question 1: You want to perform the task of setting an alarm on your mobile phone. You can assume that the alarm option is accessible from the main menu of your phone. (a) P

What is byte addressable memory? The assignment of successive addresses to successive byte locations in the memory is known as byte addressable memory.

What is the protocol used by SAP Gateway process? The SAP Gateway method communicates with the clients based on the TCP/IP Protocol.

can i get a prepared ppt for this topic to present it in a seminar??

types of internal conditioning with explanations and examples

clasification of bus