HP 3000 Manuals

Command Syntax [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Migration Guide

Command Syntax 

The command file uses these commands:

   R     Perform the replacement, at most once per line.

   N     Perform the replacement, but don't do any more replacements on
         this line.

   G     Perform the replacement everywhere it occurs on the line.

   D     If the expression is found, delete the line.

   J     If the search expression is not found, skip the next commands
         until another group of commands is found.

   Y     If the search expression is not found, don't do any more
         replacement on this line.

   S     If the line is found, perform the replacement and set an
         internal flag.

   T     If the expression is found and the flag is already set, perform
         the replacement and clear the flag.

   |     Continuation line; up to five continuation lines are allowed.

   *     This character at the start of a line indicates a comment.

The syntax of the R, N, G, S, and T commands is

     command/search expression//replace expression/

Example 

     R/boy//girl/

This replaces the first occurrence of boy (upper- or lowercase) in each
line with girl.

The slashes in the example are the search string delimiters.  Two slashes
are used between the search and replacement strings.  If one is omitted,
the search is performed but no replacement done.

The syntax for the D, J, and Y commands is

     command/delete expression/

Example 

     D/boy/

If the string boy (upper- or lowercase) is found, the line is deleted.

The set of commands used in search expressions differ from those used in
replacement expressions.  In particular, some of the same command
characters have different meanings depending on whether they are part of
the search expression field or the replace expression field.  The
following sections explain these differences.



MPE/iX 5.0 Documentation