Option 'r' --> Match Replacement (Requires Pattern File(s)).
QTGrep
will write the input file scanned for matches, to an output file with
all
matched strings replaced with specified replacement strings. The
replacement
strings are specified in a pattern file with the pattern file
replacement
string operator, '#r', see the '-?#' help screen. An audit of
changes
is written to the log file, QTGrep.log. For an explanation of the
audit
information in the log file, see the 'z' option information.
The output file contains the input file with any matched strings
replaced
by the replacement strings. If there were no matches, the output
file
is a copy of the input file. The output file name is derived from
the
filename mask specified in the pattern file. See '-?#' for
information
on the filename mask.
This option is a global option and must be specified before any input
files
are specified. This option also, by default, 'toggles' the 'a'
option
so that all non-embedded and non-over-lapping matching strings are
found
and replaced. If the 'a' option is also invoked with or
after
the 'r' option, then only the first match in a record will be found and
replaced.
This option will unconditionally turn off the 'D' option.