Break keys, Computer Engineering

Assignment Help:

Like a normal read, your input should break on the new line character "\n"  and also on the up and down arrow keys. You will process the input made by the user when he/she enters new line.

History

Your shell must keep a history of the last 10 commands executed. When the user presses the up key the current input should show the last command executed (as the user typed it). So if the user executed the "ls" command, then pressed the up key, then pressed enter, the ls command should be executed. When the user presses up multiple times, you should replace the input with the next previous command. Until you reach the end of the history list (max of 10). If the user presses up and reaches the end of the list, the next time up is pressed nothing should happen. Conversely when the down arrow is pressed you should cycle through the history in the other direction. So if

the user presses down without pressing up, nothing should happen. That is because you will be at the bottom of the list. After a command is executed it should be added to the list and the index of where the user is in the history should be reset. This functionality should be similar to how the Bash shell works.


Related Discussions:- Break keys

Explain the term recursion, Explain the term recursion A recursive functi...

Explain the term recursion A recursive function is one which calls itself. Recursive functions are useful in evaluating certain types of mathematical function. Here is a recursiv

What do you mean by inline function, The idea behind inline functions is to...

The idea behind inline functions is to insert the code of a known function at the point where the function is called. If done carefully, this can improve the application's performa

Explain the violating basic security principles, Explain the violating basi...

Explain the violating basic security principles There are drawbacks to permitting users to access the Intranet as well as not permitting them. A simple consideration such as a

What are privileged instructions, What are privileged instructions?  So...

What are privileged instructions?  Some of the machine instructions that might cause harm to a system are designated as privileged instructions. The hardware permits the privil

Explain about the voice recognition device, Explain about the Voice recogni...

Explain about the Voice recognition device Blind and partially-sighted people can communicate with a computer using microphone and software (keyboard and touch screens can't be

Explain shift register with diagram and waveform, Q. Explain Shift register...

Q. Explain Shift register with diagram and waveform.   Q. Write a short note on Decoder.

How to develop an object model, How to develop an object model To deve...

How to develop an object model To develop an object model firstly identify classes and their associations, as they affect overall problem structure and approach. Then prepare

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