[plug] FW: New network card - update

Christian christian at global.net.au
Sat Oct 31 20:06:27 WST 1998


At 18:05 31/10/98 +0800, you wrote:
>Got it:
>1) to search lots of files:
>	find . | xargs grep "0x300"
>

You could also use: grep blah `find .` 2> /dev/null

This also redirects stderr to /dev/null which prevents grep from
complaining that you're trying to grep a directory (this is also a problem
with the xargs method).  

The backquotes basically mean that the string inside them will be passed to
the shell and whatever it returns will be expanded on the command line
(similar to the way wildcards works when expanding filenames).  To me
that's a little more intuitive than using xargs in this case.

I think the backquoted method is also slightly more efficient (one less
fork/exec I think) and it seems to run faster from the totally unscientific
tests I tried.  Not that it's really important with the machines everyone
uses nowadays but just thought I'd mention it. :)

Cyas,

Christian.



=========================================================================
"It's not like I have 15-year-old girls throwing their underwear at me,
I think the 15-year-old geek inside me is still disappointed about that."
                                                         - Linus Torvalds


More information about the plug mailing list