Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to sort a column into numerical order 1

Status
Not open for further replies.

maxcrook

Programmer
Jan 25, 2001
210
GB
I have several numbers with a count next to them as shown below:

12345678 10
12345789 1
22235689 23

I need to be able to sort the numbers out so that they are displayed as follows:

22235689 23
12345678 10
12345789 1

ie. The second field is sorted with the highest count value first.
The numbers are in a file called Count_of_num

 
IMHO it's easier (though perhaps not as much fun) to download such data and manipulate it using a spreadsheet or similar tool. Have you considered this option?
 
I could do that but i really need the rawdata to remain on the rs6000.

 
sort -k 2.2b,2r $FILE

$FILE being the file with the numbers in it.

crowe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top