Modification Commands


 

The MODIFY command changes, deletes or appends to the existing data of one or more data lines with a single command. Various supplemental commands are available with the MODIFY command to enhance the type of modification performed. The format of the MODIFY command is as follows:

 

:M[[{G/P}{Q}{V}{A}{A}{N}{n/n,m/n:m}] [{modify string]]

 

where the additional parameters are as outlined below:

G

Global. Modify all occurrences within the file.

P

Page. Modify all occurrences below and including the pointed line on the screen.

V

Verification. Allow for you to verify that the modification specified is to actually be performed on this occurrence. An answer of 'Y' causes the modification to be done. Any other ASCII character causes the next occurrence to be located. The ENTER key terminates the modify command.

Q

Query. At the time the specified old string is located, prompt the operator for the new string. The new string must be entered at this time. A null entry is treated as if no new string had been entered.

A

All. Modify all occurrences within the data line or the specified field(s) or columns. The normal modify only changes the first occurrence of the old string to the new string specified.

S

Skip comments. Any line that begins with the comment characters is to be skipped during the search with a 'G' or 'P' modify command. A comment line is any line that begins with a semi-colon (;), asterisk (*), period (.) or a plus sign (+). The SKIP parameter is only valid with the 'G' and 'P' specifications.

N

No display. Do not redisplay the data line(s) until all modifications are completed. With the 'G' command, displays are held until all modifications are completed. With the 'P' commands, displays are held until each line is modified. With the 'A' command, the display is held until completion of all occurrences on that data line. The 'N' parameter is only valid with the 'G', 'P' and 'A' specifications.

n

Field. Modify as per additional specifications only within field n.

n,m

Fields n through m. As above, work only with fields n through m.

n:m

Columns n through m. As above, work only with columns n through m.

Note the following:

  1. The ESCAPE sequence terminates the 'G', 'P' and 'A' modify commands.

  2. The F10 function key terminates the 'Q' modify command.

  3. Multi-line modification parameters such as the 'G' and the 'P' are mutually exclusive.

  4. The only requirement for sequencing of the specifications is that the 'M' be first; any other parameter with the exception of the field or column specifications be next and the field or column specifications be last.

 

 

See Also: Example Commands, SUNEDIT Commands, Line Edit Mode, SUNEDIT

 



System Utilities Miscellaneous Commands Modification State