Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help asap history at the osh> prompt. As an example, assume that the history consists of the commands (from most to least recent):

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

I need help asap

history at the osh> prompt. As an example, assume that the history consists of the commands (from most to least recent): ps, 1s -1, top, cal, vho, date The command history will output: 6 ps 5 1s -1 4 top 3 cal 2 who 1 date froeprogamd houl support two techniques for retrieving commands 1. When the user enters !, the most recent command in the history is 2. When the user enters a single followed by an integer N, the Nr the command history executed command in the history is executed. Continuing our example from above, if the user enters I I, the ps command will be performed; if the user enters !3, the command cal will be executed. Any command executed in this fashion should be echoed on the user's screen. The command should also be placed in the history buffer as the next command The program should also manage basic error handling. If there are no commands in the history, entering !! should result in a message "No commands in history."If there is no command corresponding to the number entered with the single , the program should output "No such comnand in history

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

3. What information do participants need?

Answered: 1 week ago