Re: [mu TECH] wc : faster, more gnarly

From: Michele Andreoli (m.andreoli@tin.it)
Date: Tue Mar 21 2000 - 11:52:21 CET


On Mon, Mar 20, 2000 at 09:25:39PM -0500, Alfie Costa nicely wrote:
>
> ...because the 'ls -Uo *' output is on multiple lines, which 'awk' is happy
> with, but which 'set' doesn't like. With a single line of input, they both do
> the same thing, (which is confusing, maybe I should write better comments), but
> for multiple lines, 'set' and 'awk' are different.
>

A pure ash solution is:

ls -Uo * |
while read x1 x2 x3 x4
do
echo $x4
done

This save a further fork calling awk.

Michele

-- 
I'd like to conclude with a positive statement, but I can't 
remember any. Would two negative ones do?       -- Woody Allen
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:13 CET