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

Give a simple example of dynamic modelling, Give a simple example of dynami...

Give a simple example of dynamic modelling using these notation A simple example using these notation is shown below in Figure:

Explain the difference between a subroutine and macro, Explain the differen...

Explain the difference between a subroutine & macro. It is inefficient to have to write code for standard routines.  For instance reading a character form the keyboard or savin

Give examples of different parameter-passing mechanisms, Explain different ...

Explain different parameter passing mechanisms to a function with the help of example? The different parameter-passing mechanisms are given below: 1.   Call by value 2.

State the data flow diagramming conpects, State the data flow diagramming c...

State the data flow diagramming conpects The approach to data flow diagramming is as follows: Create a data flow diagram for each of major outputs of system Work ba

SGML, Write short note of SGML

Write short note of SGML

Explain the concept of thread, The Concept of Thread A thread is a sequ...

The Concept of Thread A thread is a sequential flow of control within a process. A process is able to have one or more threads. Threads have their own register-values and progr

Project on adaptive concept map, to develop an adaptive concept map providi...

to develop an adaptive concept map providing personalized learning for Operating System subject with text file(in any form like html,ppt,txt,doc,pdf)as input

Design a mod-5 synchronous counter using J-Kflip-flops, What are synchronou...

What are synchronous counters? Design a Mod-5 synchronous counter using J-K Flip-Flops. Ans. Synchronous Counters : It means that all flip-flops are clocked concurrently. T

Kirchoff''s voltage law , Kirc hoff's Voltage Law   The sum ...

Kirc hoff's Voltage Law   The sum of all the voltage drops around a closed circuit loop will add to zero  V1+(-V2)+(-V3)+(-V4)= 0

Code Solution, Dear sir, I want to read Excel file and display it in grid v...

Dear sir, I want to read Excel file and display it in grid view(the headings in excel file should be grid view column heading).This should be coded in C# Windows forms Application

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