Date: Mon, 18 Oct 1999 08:46:32 -0700 From: "Scott Hess" <scott@avantgo.com> To: <n@nectar.com> Cc: <ht5t-fry@asahi-net.or.jp>, <zzhang@cs.binghamton.edu>, <freebsd-hackers@freebsd.org>, <nectar@nectar.com> Subject: Re: Search a symbol in the source tree Message-ID: <172501bf197f$f37008d0$1e80000a@avantgo.com> References: <19991017163712.3911B1D95@bone.nectar.com> <19991018031731U.tfuruya@galois.tf.or.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
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 (古谷 哲郎) <ht5t-fry@asahi-net.or.jp>)> To: <n@nectar.com> Cc: <ht5t-fry@asahi-net.or.jp>; <zzhang@cs.binghamton.edu>; <freebsd-hackers@freebsd.org>; <nectar@nectar.com> Sent: Sunday, October 17, 1999 11:17 AM Subject: Re: Search a symbol in the source tree > From: Jacques Vidrine <n@nectar.com> > 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?=) <ht5t-fry@asahi-net.or.jp> 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 <ht5t-fry@asahi-net.or.jp> > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?172501bf197f$f37008d0$1e80000a>