Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: sorting a file - multilevel

by graff (Chancellor)
on Jun 14, 2008 at 14:33 UTC ( [id://692080]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sort -k 1n -k 2n -k 10  big.file > sorted.big.file
    
  2. or download this
    perl -lane 'push @f,[@F]; END{
     print join(" ",@$_)
      for (sort{$$a[0]<=>$$b[0] ||
                $$a[1]<=>$$b[1] ||
                $$a[9] cmp $$b[9]} @f)}' big.file > sorted.big.file
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2024-04-25 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found