HP NonStop G-Series User Manual
Page 114
![background image](/manuals/397048/114/background.png)
CHANGE Command
EDIT Command Summary
058061 Tandem Computers Incorporated
4–35
4.
If line number 19 is the current line and the current file is:
11 Thomas, Thomas
12 The piper's son
13 Stole a pig
14 And away he run.
15 The pig was eat
16 And Thomas was beat
17 And Thomas went crying
18 Down the street.
19 Thomas, Thomas
20 The piper's son
21 He learned to play
22 When he was young;
23 But all the tunes
24 That he could play
25 Was "Over the hills
26 And far away."
then:
*CHANGE "Thomas "Tom" "Thomas" NUM 1/9
11 Thomas, Tom
16 And Tomwas beat,
17 And Tomwent crying
19 Thomas, Tom
*
String-range element
of the range-specifier
parameter
EDIT searches for the first through the ninth lines (regardless of actual
line numbering) that contain the string
Thomas
, then changes every
Thomas(space)
that it finds on these lines to
Tom
. In this case, there
were only four lines that contained the specified string, so all were
changed. Also note that the string
Thomas,
(with the comma) did not
change; EDIT changes only the strings that match exactly the string
typed in the CHANGE command line.