Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Nov 1999 10:00:50 -0700
From:      Warner Losh <imp@village.org>
To:        Jacques Vidrine <n@nectar.com>
Cc:        Tetsuro Teddy FURUYA (=?iso-2022-jp?B?GyRCOEVDKxsoQiAbJEJFL086GyhC?=) <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:  <199911011700.KAA07548@harmony.village.org>
In-Reply-To: Your message of "Sun, 17 Oct 1999 11:37:11 CDT." <19991017163712.3911B1D95@bone.nectar.com> 
References:  <19991017163712.3911B1D95@bone.nectar.com>  <Pine.GSO.3.96.991012102820.6979B-100000@sol.cs.binghamton.edu> <19991018003944T.tfuruya@galois.tf.or.jp> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <19991017163712.3911B1D95@bone.nectar.com> Jacques Vidrine writes:
: > $find . -name "*.c" -print -exec "egrep" "-i" "idt" {} \; | less
: > Here , "idt" is a search string.
: 
: That's because no one wants a separate invocation of egrep for
: every file!

     find . -name \*.c | xargs egrep -i idt | less

is shorter to type and will generally fork only a couple of times for
the entire source tree.

Warner


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?199911011700.KAA07548>