why does "cut" print fields in original order?

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

 



  nitpicky, yes, but it occasionally irritates me that "cut" will
print fields, not in the order you specify them with the "-f" option,
but in the original order in the source text, to wit:

$ cut -d: -f1,7 /etc/passwd
root:/bin/bash
bin:/sbin/nologin
daemon:/sbin/nologin
...

$ cut -fd: -f7,1 /etc/passwd
root:/bin/bash
bin:/sbin/nologin
daemon:/sbin/nologin
...

  is there really a reason that cut refuses to acknowledge the order
of the fields as supplied by the user?  some historical reason,
perhaps, that we can now all make fun of and wonder what they were
smoking at the time?

rday

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================


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

  Powered by Linux