On Mon, Jul 30, 2001 at 01:50:55PM -0700, Greg Tomczyk wrote:
> Anyone have any ideas? maybe find2perl is not the answer; I do not know..
find2perl is exactly what you want. It takes a command line as you'd give
it to find and converts it into Perl. You can then take this code and use
it directly, or modify it as you see fit.
> find $dir -local -exec grep -q $string {} |;
find2perl doesn't recognized the -local option, and the last argument to
-exec should be ;, not |;. This is how you would invoke find2perl (I'm
assuming here that -local tells your find not to cross filesystem
boundaries; my find (GNU find 4.17) has no option by that name).
find2perl / -xdev -exec grep -q "string" {} \;
This will generate the code that is the equivalent of the find command you
showed. Modify it to taste.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]