From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <35d1a51a345858e759eea904502ce78e@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] rc - how to... From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 12 Sep 2002 15:42:38 +0100 Topicbox-Message-UUID: e93e0730-eaca-11e9-9e20-41e7f4b1d025 > 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)