AWK experts - how would I code around this in awk...
Doug Robinson
dkrr at telus.net
Sat Feb 27 18:12:14 UTC 2010
Steve Flynn wrote:
> On Sun, Feb 21, 2010 at 7:48 PM, Doug Robinson <dkrr at telus.net> wrote:
>
>
>> My guess is that it will prove fastest esp. with a multi core cpu;
>> common these days.
>>
>
> Sample file of 1,375,031 lines. Output set to 20 characters.
>
>
> tr piped into fold
>
> real 0m18.61s
> user 0m15.38s
> sys 0m2.46s
>
>
> Perl version:
>
> real 0m41.25s
> user 0m39.09s
> sys 0m2.06s
>
>
>
> Output set to 32768 bytes:
>
> tr | fold fails as with "Invalid number". Manual page mages no
> reference to a maximum value, oddly enough.
>
>
> Perl version:
>
> real 0m4.80s
> user 0m2.97s
> sys 0m1.64s
>
>
> As exepct, tr and fold is a lot faster, when it works! :) Perl wins
> for "just working".
>
>
Well - we can't have that!
Do you have the time to find out which of 'tr' | 'fold' come up with
that message.
I cannot find 'Invalid number' in either src.
Thank you for your time.
dkr
More information about the ubuntu-users
mailing list