## shell wrapper for perg awk util
##  passing the regex and file is annoying, but this is the
##	simplest method I see
##

if [ $# -lt 2  ]
then
{
format <<HERETO

USAGE:  wordmatch    regular_expression    file [file2...file8]

"wordmatch" returns all words matching a "regular expression". 
Words in the same
line that match are returned on the same line in the output. 
"Words" are whitespace-delimited. The line-wise regex operators like
^ are interpreted word-wise; ^d matches words beginning with d. 
See ed or awk for a detailed description of regular expressions. Do NOT 
include the surrounding slashes when using wordmatch. 
HERETO

get <<HERETO
EXAMPLE:   
\$wordmatch ^j /COPYING
judgment
\$

version 19990710
Copyright 1999 Rick Hohensee
this file and the wordmatch/perg awk script are released for redistribution 
	only as part of an intact entire cLIeNUX Core.
HERETO
}
else
{

awk -f perg -v PATTERN=$1  $2 $3 $4 $5 $6 $7 $8 $9

}

fi
