• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask - grep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/


  • Follow-Ups:
    • Re: NSTask - grep
      • From: Markus Hitter <email@hidden>
  • Prev by Date: Security FrameWork Help
  • Next by Date: YADOTQ (Yet Another DO Threading Question)
  • Previous by thread: Re: NSTask - grep
  • Next by thread: Re: NSTask - grep
  • Index(es):
    • Date
    • Thread