9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] rc - how to...
Date: Thu, 12 Sep 2002 15:42:38 +0100	[thread overview]
Message-ID: <35d1a51a345858e759eea904502ce78e@vitanuova.com> (raw)

> du / | while(file=`{read})
> 	echo $file

it's probably worth mentioning that this is really quite slow, as the
read command is unable to do any IO buffering, must read one
character at a time, and is reloaded on every line of input:

on my machine,
	while (file=`{read}) {}

exececutes about 85 lines a second, whereas a simple xargs-like
program processes about 4300.

this could be quite significant if you're using to process
output from du (what was viable in the old bourne
shell with

	du . | while read x
	do something with $x
	done

is not necessarily fast enough in the rc equivalent)



             reply	other threads:[~2002-09-12 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 14:42 rog [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-09-13 14:09 Fco.J.Ballesteros
2002-09-14  0:16 ` Jim Choate
2002-09-13 13:50 rog
2002-09-13  8:01 Fco.J.Ballesteros
2002-09-12 14:10 Russ Cox
2002-09-12 14:03 steve.simon

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=35d1a51a345858e759eea904502ce78e@vitanuova.com \
    --to=rog@vitanuova.com \
    --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).