[TUHS] Unix gre, forgotten successor to grep (was: forth on early unix)

Thalia Archibald via TUHS tuhs at tuhs.org
Tue Sep 23 04:38:06 AEST 2025


Spurred by the discussion on regular expressions in the Forth thread:

Unix V10 included a command named gre, which aimed to succeed grep, egrep, and
fgrep.

Does anyone know anything about it? Who wrote it? Was it used anywhere or
succeeded by anything? Was it connected to Plan 9 or Inferno?

>From its man page:
> Gre supplants three classic programs, which are still available:
> Grep handles only ed(1)-like regular expressions. It uses \(\) instead of ().
> Egrep handles the same patterns as gre except for back-referencing with \1, \2, ...
> Fgrep handles no operators except newline (alternation).

https://www.tuhs.org/cgi-bin/utree.pl?file=V10/cmd/gre
https://www.tuhs.org/cgi-bin/utree.pl?file=V10/man/man1/gre.1

Thanks,
Thalia Archibald


More information about the TUHS mailing list