GRES - substitute for a pattern in a file or stream

Usage: gres [ -g ] [ -n ] [ -p ] pattern [ -r ] replacement [ file... ]

This is gres version 1.4.5, a simplified version of GNU sed, from which it was derived. Gres will substitute the first occurance of the given pattern with the given replacement on each line of the given file(s) (or STDIN, if the file name is "-" or is n' specified). If the -g option is specified, all occurances of the given pattern will be replaced. If the -n option is specified, gres will not print lines of the file which have not been altered. If no -p flag is given, gres will use the first non-option argument as the pattern. If no -r flag is given, gres will use either the first non-option argument (or the second if -p is also unspecified) as the replacement string. If multiple -p or -r flags are given, only the last one will be used. Gres uses block reads which greatly speed up processing when compared to GNU sed.

This version of gres may be linked against sfio instead of stdio. In almost all cases, this will result in better performance. To use this feature, run the configure script with the "--with-sfio" option. Libsfio.a and its associated files must exist. The configure script will look for libsfio.a and its associated files in the normal system directories or under the gres source tree under sfio/.

Here's an html version of the man page.

Here is the CHANGES file.


Gres is released under the terms of the GNU Public License, Version 2.

Gres was inspired by the MKS Toolkit for DOS (Mortice Kern Systems, Inc., Ontario, Canada).

Gres can be obtained from here: (Gzipped tar format, Intel GLIBC2 Linux binary rpm, Source rpm)



Matt Shibla
Last modified: Sun Sep 17 18:37:02 EDT 2000

SourceForge Logo