#!/bin/csh set ab = `uname` if ( x.$ab != x.SCO_SV ) then # { set and="-and" # for BSD else # }{ set and="" # for uname=SCO_SV # man find < SCO: # Note that placing two primaries next to each other is the # equivalent of the logical ``and'' operation. The precedence of # this operation is less than that of the ``!'' operator but # greater than that of the -o operator. endif # } find . -type f \( \ \! -name \*.a $and \ \! -name \*.afm $and \ \! -name \*.com $and \ \! -name \*.core $and \ \! -name \*.db $and \ \! -name \*.eps $and \ \! -name \*.exe $and \ \! -name \*.gif $and \ \! -name \*.gsf $and \ \! -name \*.gz $and \ \! -name \*.jpg $and \ \! -name \*.lrz $and \ \! -name \*.o $and \ \! -name \*.pcl $and \ \! -name \*.pfa $and \ \! -name \*.pfb $and \ \! -name \*.pfm $and \ \! -name \*.ps $and \ \! -name \*.tar.gz $and \ \! -name \*.tgz $and \ \! -name \*.tiff $and \ \! -name \*~ \ \) -print0 | xargs -0 grep -i "$1" # The -0 stuff is to cope with disgusting names, EG # .pgp/.matchcache.PGP 2.6 # .pgp/.matchcache.PGP 5.0 # Some damn lame brain programmer putting spaces in file names - sigh !