From: George Michaelson <ggm@apnic.net>
To: 9fans@cse.psu.edu
Subject: Re: Plan 9 annoyances (was: Re: [9fans] mv vs cp)
Date: Tue, 9 Oct 2001 21:50:27 +1000 [thread overview]
Message-ID: <17563.1002628227@apnic.net> (raw)
In-Reply-To: Your message of "Tue, 09 Oct 2001 11:55:04 +0100." <20011009104245.DE77F19A0F@mail.cse.psu.edu>
> > > i've missed find several times. xargs always struck me as
> > > compensating for poor shell design.
> >
> > Isn't the problem the argv limits of number of characters and number of
> > words?
>
> i don't think so entirely...
>
> for instance if i want to grep through an entire source tree,
> i don't want to wait until the tree has been traversed completely
> before the text searching begins. using
>
> du -a . | awk '{print $2}' | xargs grep pattern
>
> often gives me results much faster than
>
> grep pattern `{du -a . | awk '{print $2}'}
>
if you had a way to unblock/buffer the pipe, would the diffence be that
great?
That aside, I suspect I prefer the xargs one because my frontal lobes
are wired for linear tape-processing methods, and the second one requires
understanding function theory and/or two passes to parse the nested clause.
> the latter usually works. i don't know what the kernel
> limit is on command-line arguments, but it's more than sufficient
> to pass all the source files in /sys/src (6764 files, ~160K).
>
> rog.
Ie if you deliberately avoid the glob expansion problems which bedevill
ls * | do a bunch of stuff you don't need find in flat spaces.
xargs is cheap to implement in a shellscript and I have done that too,
because I didn't know xargs existed for a long time. Likewise I use awk
'{print $fieldnum}' because I didn't know cut existed, and my erstwhile
younger and wiser heads find me laughably inept at shell these days.
So is this yet another iteration of 'why write a command when you can write
a script' ?
-George
PS amusingly enough, the same year I was learning about v7 on a pdp11
in Leeds, I had an Armenian guy try and convince me PICK was the way of
the future, and that all coming filesystems would be database abstraction.
I suppose if I'd been malleable enough I'd have bought that too. Still,
we all laughed at the head of department for being a laser physicist. "What
could *he* know about computing?" we said. And more fool us...
--
George Michaelson | APNIC
Email: ggm@apnic.net | PO Box 2131 Milton QLD 4064
Phone: +61 7 3367 0490 | Australia
Fax: +61 7 3367 0482 | http://www.apnic.net
next prev parent reply other threads:[~2001-10-09 11:50 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-09 10:55 rog
2001-10-09 11:50 ` George Michaelson [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-10-16 19:46 forsyth
2001-10-15 18:36 David Gordon Hogan
2001-10-15 14:45 presotto
2001-10-11 15:17 forsyth
2001-10-11 19:29 ` Micah Stetson
2001-10-11 12:21 bwc
2001-10-11 11:20 forsyth
2001-10-12 9:23 ` pac
2001-10-10 10:50 forsyth
2001-10-10 13:06 ` Sam Hopkins
2001-10-10 10:45 forsyth
2001-10-09 17:08 forsyth
2001-10-10 8:56 ` Thomas Bushnell, BSG
2001-10-10 9:55 ` Mike Haertel
2001-10-10 10:09 ` Lucio De Re
2001-10-11 9:10 ` Thomas Bushnell, BSG
2001-10-09 16:55 anothy
2001-10-09 15:23 anothy
2001-10-09 14:56 anothy
2001-10-09 13:18 bwc
2001-10-10 8:57 ` Douglas A. Gwyn
2001-10-09 10:12 forsyth
2001-10-09 16:18 ` Thomas Bushnell, BSG
2001-10-08 21:24 Russ Cox
2001-10-08 21:21 rog
2001-10-08 20:17 Russ Cox
2001-10-14 19:54 ` Mike Haertel
2001-10-15 6:46 ` Boyd Roberts
2001-10-15 8:30 ` Mike Haertel
2001-10-08 16:51 anothy
2001-10-09 9:04 ` Thomas Bushnell, BSG
2001-10-09 9:04 ` Ralph Corderoy
2001-10-10 8:56 ` Douglas A. Gwyn
2001-10-08 6:27 [9fans] mv vs cp Lucio De Re
2001-10-08 8:38 ` Plan 9 annoyances (was: Re: [9fans] mv vs cp) Mike Haertel
2001-10-08 9:08 ` Lucio De Re
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17563.1002628227@apnic.net \
--to=ggm@apnic.net \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).