The change command: modifying text lines – HP NonStop G-Series User Manual
Page 54

The CHANGE Command: Modifying Text Lines
Revising Text in Your File
058061 Tandem Computers Incorporated
3–11
The CHANGE
Command: Modifying
Text Lines
The CHANGE command is an editing command that allows you to make
changes to specified character strings in your file. The following examples
demonstrate how you can:
Correct misspellings in one line or a range of lines
Modify character strings in one line or a range of lines
Combine CHANGE with the keywords ALL, BOTH, and WORD to
further modify the changes you want to make
When you list the text in a file, sometimes you find misspelled words. To
correct spelling and typing errors, you can use the CHANGE command.
Suppose you are working on the following file:
1 Jack be nimble
1.1 Jack be quick
1.2 Jack jumb over the candlestick.
2 Went up a hill
4 Jack fell down
5 And broke his crown
6 And Jill came tumbling after.
You mistyped the word jump when you added text at line number 1.2. To
correct this mistake, type:
*CHANGE "jumb"jump" 1.2
1.2 Jack jump over the candlestick.
*
Notice that the CHANGE command displays the changed line. If, for some
reason, the CHANGE command cannot make the change you request (for
instance, a syntactically incorrect CHANGE command or a change to text or
file lines that do not exist), it returns the * prompt.