How about this...
perl -e'print$_->[0]for sort{$b->[3]-$a->[3]}map[$_,split/:/],<>' /etc +/passwd
With additional whitespace, that's...
perl -e'print $_->[0] for sort { $b->[3] - $a->[3] } map [$_, split /: +/], <>' /etc/passwd
In reply to Re: Golf: reverse sort /etc/passwd by UID
by tobyink
in thread Golf: reverse sort /etc/passwd by UID
by Tommy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |