![]() |
![]() |
|
|
![]() |
![]() |
Using HP 3000 MPE/iX: Fundamental Skills Tutorial: HP 3000 MPE/iX Computer Systems > Chapter 2 Communicating with Your Computer![]() Lesson 5 The History Stack |
|
Lesson 5 presents reexecuting and editing commands in the history stack. The history stack is a portion of the computer's memory where the computer records your most recent commands. It keeps them there for you to reuse or correct. Having to reenter a complex command line could be tedious.
The DO command allows you to retrieve a complex command and reexecute it without having to reenter it. The REDO command allows you to retrieve a command, edit it, and reexecute it without having to reenter the entire command.
There is a reason for having you log off and log back on. Logging off clears the command line history stack. Logging back on starts you with an empty history stack; otherwise, the history stack would be cluttered with previous commands. Each time you enter a command, your MPE/iX system saves that command in a list called the command line history stack. You may hear it called the redo stack. In the command line history stack, each command is added at the bottom of the list as it is entered:
Enter these commands just the way they are shown here:
CHOWMM produces an error message. SHOWTIME and SHOWJOB produce the displays of the kind you have seen before. LISTREDO displays past commands. Enter:
Here is how your screen looks:
All of the commands you issued, including the LISTREDO command itself, are stored in the history stack. They appear in the order you entered them. If you want to reexecute a command in the history stack without editing, use the DO command:
For example, reexecute the third command you that entered (SHOWJOB). Enter:
Did the SHOWJOB command execute? Was it added to the history stack? Enter:
How would you use DO to reexecute the SHOWTIME command? Enter:
Was it added to the history stack? Enter:
The history stack by default holds only the last 20 commands of your current session. But the history stack never runs out of room. Instead, it continues recording commands by number, dropping the oldest command to make room for the newest command. Suppose that the letters of the English alphabet (A through Z) were commands. If you were to use all 26 commands and then execute LISTREDO, you would see something like this:
The REDO command works like the DO command, but with one difference: REDO allows you to edit a command in the command line history stack before you reexecute it.
Enter :
You should see the sequence of commands you have issued. To edit the command that was entered incorrectly (CHOWMM) enter:
Command 1 in your history stack is retrieved, ready for you to make corrections to it, using the REDO line editing methods you are now familiar with:
Try entering:
Notice that the commands you that have issued have stacked up, one after the other. HELLO never appears in the command line history stack.
|
![]() |
||
![]() |
![]() |
![]() |
|||||||||
|