Accept commands from the user, Computer Engineering

Assignment Help:

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.


Related Discussions:- Accept commands from the user

Identifying constraints between objects, Identifying Constraints between Ob...

Identifying Constraints between Objects In a system, there are few boundaries to work on. Boundaries or Constraints are functional dependencies among objects which are not con

Define frequency division - application of flip flops, Define Frequency Div...

Define Frequency Division - Application of Flip Flop? When the pulse waveform is applied to the clock input of a J-K flip-flop that is connected to toggle, the Q output is a s

What are batch systems, What are batch systems?  Batch systems are quit...

What are batch systems?  Batch systems are quite appropriate for implementing large jobs that need little interaction. The user can submit jobs and return later for the results

Pre order given find post order ?, The preorder traversal sequence of a bin...

The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?

Learning abilities of perceptrons - ann, Learning Abilities of Perceptrons ...

Learning Abilities of Perceptrons - Artificial intelligence Computational learning theory is the study of what concepts specific learning schemes (representation and method) ca

Mini project, give proper code for any kind of project in oop c++

give proper code for any kind of project in oop c++

Illustrate about packet switching, Q. Illustrate about Packet switching? ...

Q. Illustrate about Packet switching? Packet switching is used to avoid long delays in transmitting data over the network. Packet switching is a technique that limits the amoun

Radius of curvature in differential calculas, find the radius of curvature ...

find the radius of curvature at the point (3,3) at a point x3+xy2-6y2=0?

State about CSMA/CA, State about CSMA/CA It belongs to a class of proto...

State about CSMA/CA It belongs to a class of protocols known as multiple access methods. CSMA/CA  stands  for:  Carrier  Sense  Multiple  Access  with  Collision Avoidance.  In

Explain the effect of cell breathing, Problem : (a) State and describe ...

Problem : (a) State and describe the transmission ranges associated with wireless transmission. Illustrate your answer with a diagram. (b) Sketch a graph representing how a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd