Table of Contents
gres - substitute for a patterm in a file or stream
gres
[ -g ] [ -n ] [ -p ] pattern [ -r ] replacement [ file... ]
Gres
implements a specialized subset of the GNU sed functionality to search
the named input file(s) (or standard input if no file is named, or the
file name - is given) for lines containing a match to the given pattern.
Gres substitutes replacement for the first occurance of pattern on each
line. See OPTIONS below. If no -p flag is specified, the first non-option
argument will be used as the pattern. If no -r flag is specified, the first
non-option argument (or the second if -p is also unspecified) will be used
as the replacement. If multiple -p or -r flags are given, only the last occurances
will be used.
- -g
- Replace every occurance of pattern (global replacement).
- -n
- Suppress the output of unmodified lines.
- -p
- Specify the given regular
expression as the pattern for replacement.
- -r
- Specify the given string
as the replacement for pattern.
The command appeared in the MKS
Toolkit (Mortice Kern Systems, Inc., Ontario, Canada) for DOS.
sed(1)
Table of Contents