HP Integrity NonStop H-Series User Manual

Page 110

Advertising
background image

Replacing Words

Advanced Editing Features

058060 Tandem Computers Incorporated

4–25

Replacing Words

The REPLACE command has the SEARCH function built into it. The way
you usually use REPLACE is to have TEDIT search the entire file and
replace all the search-text with replace-text in one step. During this process,
TEDIT leaves the cursor where it is, makes all the replacements, and gives
you a message on the status line when the task is finished.

You can, however, have TEDIT stop at each occurrence of the search-text
and wait for you to confirm that you want the search-text replaced. You
ask for this feature by typing CONFIRM (or C) in the Options field of the
REPLACE response lines.

REPLACE is the best command to use when you want to make an exact
substitute of a specific word or phrase with another throughout the entire
file. A good example in the form letter is “first-name.” It must be replaced
twice with exactly the same name. To perform the replacement, follow
these steps:

1.

Press the REPLACE key.

2.

When the response lines appear, fill them in as shown in the following
example.

Replace: first-name
With: Sydney
In lines: */B
In columns: 1:239
Options:

Leave this field blank.

Type the search-text.

Type the

replace-text.

The default is to search

from the cursor position to

the bottom of the screen.

The default is to search

all possible columns.

3.

Press *C to issue the command. TEDIT replaces all occurrences of the
search-text with the replace-text within the lines and columns you
specified. When TEDIT has finished the replacements, it displays a
message on the status line confirming that.

Advertising
This manual is related to the following products: