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

Principle of locality of reference, Problem: (a) What do you understand...

Problem: (a) What do you understand by the principle of locality of reference and explain how this is exploited in cache design. (b) Consider a 32-bit microprocessor that h

What is a PCI bus and discuss its aspects and usage, What is a PCI bus? Dis...

What is a PCI bus? Discuss its aspects and usage. Peripheral Component Interconnect (PCI): This bus was developed by Intel and introduced in 1993. It is geared specifically to

What can be middle wares role within e-commerce, What can be middle wares r...

What can be middle wares role within e-commerce? By the utilize info Platform Commerce Server a shopping service can take benefit of reaching the end user onto Open TV, SMS, WA

Mapping design principle, The following definition of mapping is adapted fr...

The following definition of mapping is adapted from the first edition of the Set Book: Mapping concerns the relationship between controls and their effects in the world. Nearly al

Granularity-concept of parallel execution and concurrent , Granularity ...

Granularity Granularity refers to the quantity of computation done in parallel relative to the dimension of the entire program. In parallel computing, granularity is a qualitat

Explain standard set of procedure to complete a call process, Explain a s...

Explain a standard set of procedure for completing a local telephone call or call processing. Completing a local telephone call among two subscribers connected to the similar

Decision trees, Decision Trees: Visualize you only ever do four things...

Decision Trees: Visualize you only ever do four things at the weekend such as go shopping or watch a movie or play tennis and just stay in. In such case what you do depends on

What is a session in php, A session is a logical object formed by the PHP e...

A session is a logical object formed by the PHP engine to permit you to preserve data across subsequent HTTP requests. There is only one session object available to your PHP scr

Determine the simulation factor- weather, Determine the simulation factor- ...

Determine the simulation factor- Weather Illustration of simulation is predicting weather (i.e. a weather forecaster). In this case we will consider what/how data is collected,

What is file scope, Explain File scope File scope: The variables and ...

Explain File scope File scope: The variables and functions with file scope appear outside any block or list of parameters and are accessible from any place in the translation

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