help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to extract *and reorder* columns?


From: kj
Subject: Re: How to extract *and reorder* columns?
Date: Sun, 2 Mar 2008 17:16:40 +0000 (UTC)
User-agent: nn/6.7.3

In <mailman.8151.1204415571.18990.help-gnu-utils@gnu.org> bob@proulx.com (Bob 
Proulx) writes:

>kj wrote:
>> I need to extract and reorder some columns from some very large
>> files.  GNU cut will extract the columns nicely and quickly, but
>> won't reorder them.  I can do the reordering easily by piping the
>> output of cut through a perl one-liner, but I'm looking for something
>> faster.
>> 
>> Is there a GNU utility that will do this?

>Not just GNU but POSIX standard.  Use awk.

This is quite a revelation.  I never knew that awk was so much
faster than perl.  I'm getting speed-ups of 6 or 7-fold...

Thanks!

kynn

-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]