Displaying a specific command, Executing a specific command – HP NonStop G-Series User Manual

Page 68

Advertising
background image

Working With SAFECOM

Safeguard User’s Guide422089-009

7 -8

Displaying and Editing Previous Commands

Displaying a Specific Command

The ? command allows you to display a specific command entered earlier in the
current session. You can specify the command to be displayed by entering a line
number, a relative line number, or a text string, as the following examples show.

For example, this ? command requests the display of command line number 18:

=? 18
=ALTER DISKFILE PROGFILE, PROGID ON
=

You can also specify a minus (-) line number to search for a command line number
relative to the current line number. For example, if your current command line number
is 23, the following ? command displays the command at line 20. For clarity, the
following examples assume that you used the DISPLAY PROMPT command to specify
that your normal SAFECOM prompt is to include a line number. The command line
number does not change until you execute a command other than ?, !, or FC.

23=? -3
23=INFO DISKFILE PROGFILE, DETAIL
23=

There are two ways to request a search for a command that contains a specific text
string. If you do not enclose the string in quotes, the ? command searches for the most
recent command that starts with the designated string. The following ? command
illustrates this type of search:

23=? add
23=ADD DISKFILE QUARTER1, ACC 2,18 O
23=

If you enclose the text string in quotes, the ? command searches the most recent
command that contains that string anywhere within the command. The following ?
command performs this type of search:

23=? "quarter2"
23=ALTER DISKFILE QUARTER2, LIKE QUARTER1
23=

Executing a Specific Command

The ! command functions like the ? command except that the specified command is
executed when it is displayed. For example, the following ! command displays and
executes the most recent command that contains the text string “quarter2”:

23=! "quarter2"
23=ALTER DISKFILE QUARTER2, LIKE QUARTER1
24=

SAFECOM increments the command line number because the ALTER DISKFILE
command was executed.

Advertising
This manual is related to the following products: