Revising text in your file, Then with the following command, Using keywords with the change command – HP NonStop G-Series User Manual

Page 58

Advertising
background image

Using Keywords With the CHANGE Command

Revising Text in Your File

058061 Tandem Computers Incorporated

3–15

If you omit WORD, EDIT changes all occurrences of a character string to a
new string. WORD is useful when the string to be changed might also be
imbedded in other words— for example, and appears inside candlestick and
command. If the current file is:

11 Thomas, Tom

12 The piper's son

13 Stole a pig

14 And away he run.

15 The pig was eat

16 And Tomwas beat,

17 And Tomwent crying

18 Down the street.

19 Thomas, Tom

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 with the following command:

*CHANGE WORD BOTH ALL "tom"TOM" ALL

11 Thomas, TOM

19 Thomas, TOM

*

EDIT searches the entire file and changes every uppercase and lowercase
word tom it finds to TOM.

Omitting the keyword WORD in this case produces the following results:

*CHANGE BOTH ALL "tom"TOM" ALL
11 Thomas, TOM
16 And TOMwas beat,
17 And TOMwent crying
19 Thomas, TOM
*

Every uppercase and

lowercase combination of

the string

tom

is changed.

Advertising
This manual is related to the following products: