a question about GREP
Kevin D. Clark
kevin_d_clark at comcast.net
Mon Mar 26 12:18:25 EDT 2007
Jerry writes:
> Kevin, in your solution (listed below), why are there 2 directory names are
> used? Could you please explain a bit to me? Thank you.
>
>
> find your-dirname1 your-dirname2 -name \*out\* \
> -exec perl -e 'undef $/;
> $filename=$ARGV[0];
> $_=<>;
> exit(!(-T $filename && /\bzip\b/))' \{\} \; -print \
> >zip.txt
>
>
> BTW, yes, I'm serious about the "plain text files" part.
By "your-dirname1" and "your-dirname2" I mean the directories *you*
are interested in searching.
For example:
find /usr/src /media/usbdrive /home/jerry/src/foo -exec perl .......
In your case, you might want to begin searching for the current
directory, which is ".".
find . -exec perl .......
Regards,
--kevin
--
GnuPG ID: B280F24E Never could stand that dog.
alumni.unh.edu!kdc -- Tom Waits
More information about the gnhlug-discuss
mailing list