Re: why does "cut" print fields in original order?

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

 



Tony Nelson wrote:

yes, i now appreciate that cut's behaviour is the very efficient
technique of treating the data as a one-way stream, so i'm good with
that.  so lay off already.  ya hear me??  LAY OFF!!!
 ...

This all rather begs the question of what tool to use after cut in order to
reorder the fields?  Don't pretend the answer is sed or awk, or their ilk.

If you'd rather pretend that more suitable tools don't exist, cut each field you want into its own file, then use paste to glue them back in the order you want. Be careful to use suitable tmp names so concurrent runs don't break.

--
  Les Mikesell
   lesmikesell@xxxxxxxxx


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux