home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / GREP15.ZIP / SCRIPTGE.AWK < prev    next >
Text File  |  1991-01-14  |  265b  |  11 lines

  1. BEGIN { print "failures=0"; }
  2. !/^#/ && NF == 3 {
  3.     print "echo '" $3 "' | egrep -e '" $2 "' ";
  4.     print "if [ $? != " $1 " ]"
  5.     print "then"
  6.     printf "\techo Spencer test \\#%d failed\n", ++n
  7.     print "\tfailures=1"
  8.     print "fi"
  9. }
  10. END { print "exit $failures"; }
  11.