Of course, this is probably more efficiently run as 'find . -name
"*.c" -print | xargs egrep -i idt | less'.  If you have interesting
filenames (containing spaces, for instance), you'll probably want to
use -print0 and whichever -0 to xargs.

zsh users can often use 'egrep -i idt **/*.c', but that doesn't work so
well if you have too many matches for the command-line to handle.

[Yes, anything like this is "slow" for some definition of the word "slow".
On a particular source tree I frequently work with, the *.c files contain
256klines of code, and running a find/xargs egrep on them takes 11s on the
first run - and <1s on the second.  Quite sufficient if you tend to do most
of your work in a single module and only periodically need to foray onto
unfamiliar terrain...]

Later,
scott

----- Original Message -----
From: <Tetsuro Teddy FURUYA (古谷 哲郎)
<[EMAIL PROTECTED]>)>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, October 17, 1999 11:17 AM
Subject: Re: Search a symbol in the source tree


> From: Jacques Vidrine <[EMAIL PROTECTED]>
> Subject: Re: Search a symbol in the source tree
> Date: Sun, 17 Oct 1999 11:37:11 -0500
> n> On 18 October 1999 at 0:39, Tetsuro Teddy FURUYA
(=?iso-2022-jp?B?GyRCOEVDKxsoQiAbJEJFL086GyhC?=) <[EMAIL PROTECTED]>
wrote:
> n> > It seems queer to me that there has been none who has refered to
> n> > find - exec
> n> > pairs.
> n> >
> n> > You may type into shell like;
> n> > $find . -name "*.c" -print -exec "egrep" "-i" "idt" {} \; | less
> n> > Here , "idt" is a search string.
> n>
> n> That's because no one wants a separate invocation of egrep for
> n> every file!
>                   ^^^^^^
> Probably, except me !
>
> But, what various and interesting methods to search symbols there are !
>
> If we do not restrict the usage of search method, there might be
> yet another methods.
>
> Teddy Furuya <[EMAIL PROTECTED]>
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to