why does "cut" print fields in original order?

Todd Zullinger tmz at pobox.com
Wed Nov 21 20:29:02 UTC 2007


Tony Nelson wrote:
> This all rather begs the question of what tool to use after cut in
> order to reorder the fields?

Why use anything after cut when you can more easily just replace cut
for this task?

> Don't pretend the answer is sed or awk, or their ilk.

How would I be pretending about this output?

awk -F : '{print $7, $1}' /etc/passwd
/bin/bash root
/sbin/nologin bin
/sbin/nologin daemon
...

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The triumph of persuasion over force is the sign of a civilized
society.
    -- Mark Skousen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20071121/fc998ad4/attachment-0001.sig>


More information about the fedora-list mailing list