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

When should we stop testing, When should you stop testing? It is quite ...

When should you stop testing? It is quite complex to determine as many modern software applications are so complex and run in like an interdependent environment that complete t

Grid computing, Grid Computing means applying the resources of a lot of com...

Grid Computing means applying the resources of a lot of computers in a network simultaneously to a one problem for solving a scientific or a technical problem that needs a large nu

What is the draw back of micro programmed control, What is the draw back of...

What is the draw back of micro programmed control? It leads to a slower operating speed because of the time it takes to fetch microinstructions from the control store.

Data communication, how CSMA protocol is improved through persistence metho...

how CSMA protocol is improved through persistence methods & collition detection

Recurrence relation, Take the following recurrence relation consider only f...

Take the following recurrence relation consider only for n = 2k for integers k ≥ 1: T(2) = 9, and for n ≥ 4, T(n) = n + T(n /2). Three students were working together in a stu

Determine the nand gate, If  the input to T-flipflop is 100 Hz signal, the ...

If  the input to T-flipflop is 100 Hz signal, the final output of the three T-flipflops in cascade is ? Ans. The  final  output  of  the  three  T-flip-flops in cascade is 12

Speed up factor, Remember, the value of α is between 0 and 1. Now, let us p...

Remember, the value of α is between 0 and 1. Now, let us put some values of α and compute the speed up factor for increasing values of number of processors.  We get that the S(N) k

Translation table encryption technique to secure transaction, Discuss about...

Discuss about Translation table encryption technique to ensure secured transactions onto the net? Translation table: In this process each chunk of data is used like an of

Interfacing assembly language routines, By now you can write procedures bot...

By now you can write procedures both internal andexternal and pass parameters particularly through stack.Let's us use these concepts to see how assembly language can be interfaced

Describe the uses of credit cards and smart cards, Credit cards and smart c...

Credit cards and smart cards Credit cards comprise a magnetic stripe on the back made up of iron-based particles in a plastic film. Stripe is split up into 3 tracks which 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