Previous Topic: Retrieving CommandsNext Topic: Examples


Using Special Command Line Values to Retrieve Commands

A set of special values that you enter on the command line lets you search for commands containing specified characters and control the contents of the command sequence. You can enter these values in upper or lower case letters and in most cases the space between the special command line value and the following text is optional.

The following table lists the special command line values and their functions:

Special Values

Abbreviations

Function

*SCANF [n] string

*SF or >>

Starting from the first command in the command sequence, retrieve the first command containing the specified string. Specify n to retrieve the nth matching command.

*SCANL [n] string

*SL or <<

Starting from the last command in the command sequence, retrieve the first command containing the specified string. Specify n to retrieve the nth matching command.

*FIRST [n] string

*F or >

Starting from the first command in the command sequence, retrieve the first command beginning with the specified string. Specify n to retrieve the nth matching command.

*LAST [n] string

*L or <

Starting from the last command in the command sequence, retrieve the first command beginning with the specified string. Specify n to retrieve the nth matching command.

– command

n/a

Execute the specified command, but do not add it to the command sequence.

+ command

n/a

Add the specified command to the command sequence, but do not execute it.

*CLEAR

n/a

Clear the commands at this invocation of the command line.

When you specify a search string, do not include "*" at the end of the string. You can however specify a '?' as a wild character in any position. To repeat the last search you entered, specify '*' instead of a search string. You can repeat the search in either chronological or reverse chronological order. These concepts are all shown in the following examples.