Re: NSTask - grep
Re: NSTask - grep
- Subject: Re: NSTask - grep
- From: "Simon Stapleton" <email@hidden>
- Date: Tue, 10 Jul 2001 09:34:17 +0100
This is sort of off-topic for development, but...
>
From: =?iso-8859-1?Q?Jean-Fran=E7ois_Veillette?= <email@hidden>
>
To: email@hidden
>
Subject: Re: NSTask - grep
>
>
if you want the shell to do it's work, create a task on
>
'/bin/tcsh -c "/usr/bin/grep somestring /Users/kglenn/*"'
>
That way, tcsh should expand the wildcard(*) for you.
>
Ummm. No. That will only do the directory he's in, and I believe he was
after a subdirectory grep too.
grep somestring `find somedirectory -name "*"`
will work in most cases, unless you have some enormous quantity of files
and a broken grep (the Solaris 2.5 implementation comes to mind). I
think the gnu implementation is ok for massive lists of files.
...or use `find` then use either xargs or the -exec syntax of find. I
can't remember the syntax offhand - I never have to use it, even on
projects with many thousands of files.
it's something like `find directory -name "*" -exec grep blah\\;` IIRC
find is your friend
Simon
--
Your mouse has moved. You must reboot Windows NT for these changes to be
recognised.
This message was sent by Easymail -
http://www.easynet.co.uk/