Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Golf: reverse sort /etc/passwd by UID

by tobyink (Canon)
on Feb 05, 2013 at 16:56 UTC ( [id://1017219]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e'print$_->[0]for sort{$b->[3]-$a->[3]}map[$_,split/:/],<>' /etc
    +/passwd
    
  2. or download this
    perl -e'print $_->[0] for sort { $b->[3] - $a->[3] } map [$_, split /:
    +/], <>' /etc/passwd
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1017219]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-18 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found