gres \*- substitute for patterns throughout a file or files
] re1 re2 rhs ] ... [ file ] ...
to the standard output, performing
substitutions for instances of one or more
The intention is to simulate a series of
editor commands of the form:
on one or more files (see
flag says that the next three arguments are
flag says that the next argument is a
in which the first line is an
Successive groups of three lines are interpreted similarly.
groups of arguments may be intermixed in any order.
commands is the order in which the program sees the
pattern-triples; that is, the order in the
command line, and within a
group, the order in the pattern-file.
flags are given, the first three arguments
When the first argument not in the scope of a flag is encountered,
it and all succeeding arguments are taken as input files.
For each line of input, an attempt is made to match the first
If the attempt succeeds, an attempt is made to replace
Whether or not either attempt succeeds, the line
as it exists after the action of the first
is used as input to the next
Normally only the first match of an
all instances of matches to
flag causes the substitution to be attempted