Date: Wed, 20 Oct 1999 02:42:18 +0900 From: Tetsuro Teddy FURUYA (=?iso-2022-jp?B?GyRCOEVDKxsoQiAbJEJFL086GyhC?=) <ht5t-fry@asahi-net.or.jp> To: freebsd-hackers@freebsd.org Subject: Re: Search a symbol in the source tree Message-ID: <19991020024218T.tfuruya@galois.tf.or.jp> In-Reply-To: Your message of "Mon, 18 Oct 1999 00:39:44 %2B0900" <19991018003944T.tfuruya@galois.tf.or.jp> References: <19991018003944T.tfuruya@galois.tf.or.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Probably, my mail did not reach freebsd-hackers mailing list because of absense of inreply-to headers. So, I will resend. ------------------------------------------------------------ Message-ID: <001301bf192c$18daa160$0533a8c0@dilemma.tf.or.jp> From: "Teddy" <tfuruya> To: "Greg Lehey" <grog@lemis.com>, <n@nectar.com> Cc: <zzhang@cs.binghamton.edu>, <freebsd-hackers@freebsd.org>, <nectar@nectar.com> Subject: RE: Search a symbol in the source tree Date: Mon, 18 Oct 1999 14:45:08 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Thank you for replying to me. -----Original Message----- Greg Lehey <grog@lemis.com> <ht5t-fry@asahi-net.or.jp>; n@nectar.com <n@nectar.com> CC : zzhang@cs.binghamton.edu <zzhang@cs.binghamton.edu>; freebsd-hackers@freebsd.org <freebsd-hackers@freebsd.org>; nectar@nectar.com <nectar@nectar.com> Re: Search a symbol in the source tree >> 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> > $find . -name "*.c" -print -exec "egrep" "-i" "idt" {} \; | less >> n> > Here , "idt" is a search string. >> n> That's because no one wants a separate invocation of egrep for >> n> every file! >> ^^^^^^ >> Probably, except me ! > >And why do you want it? Do you have too much time on your hands? I think that if we do not know old-fashed methods , we can not appreciate the goodcharacteristics of the various methods such as xargs, glimpse, grep with -R option, and global. Now, I have started to use full.exe from cygnus-b20, and its grep does not have -R option. Fortunately it has xargs, so I can utilize both of xargs and find at the same time. But, at this circumstance, we have to pay attention to the fact that xargs can not work well all the time. When seeing manpage xargs(1), they say, > Undefined behavior may occur if utility reads from the standard input. (I don't know there exists such a case really.) And, there might exist find -exec option in the older scripts. So, -exec option of the command find is still usefull and very important. If the user don't like the listing of the umatched file name at such circumstances, he/she might execute find like, find /usr/src/sys -name "*" -and -exec grep "-ia" idt {} \; -print | less or, find /usr/src/sys -name "*" -exec grep "-ia" idt {} \; -print | less As for me, when I began to use find at the first time, the find was rather difficult to use. But now it is amusing. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991020024218T.tfuruya>