# /grep

Usage:

/REQUIRE grep.tf

/FGREP pattern command
/GREP pattern command
/EGREP pattern command

Executes command and prints only the output that matches pattern (which must not contain spaces). /fgrep prints lines that contain the string pattern; /grep prints lines that match the glob pattern; /egrep prints lines that match the regexp pattern.

Remember to use "*" at each end of pattern to make /grep match lines that contain a piece that matches the glob pattern; without the "*"s, the entire line must match.

Example: "`/fgrep T'tiny.muck' /listworlds`" lists all the worlds defined with the -T'tiny.muck' option.

See: textutil.tf, /require, patterns, expressions, functions

Back to index
Back to tf home page

Copyright © 1996, 1997, 1998, 1999, 2002, 2003, 2004 Ken Keys