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!

sorting fields

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a large csv file that looks like this:

14 ,M0081,+000000001,200302,+00000100500,
14 ,M0081,+000000004,200301,+00000100500,
14 ,M0081,+000000005,200305,+00000100500,
14 ,M0081,+000000000,200205,+00000100500,
14 ,M0081,+000000008,200204,+00000100500,

I need to sort on the first, second and fourth fields so that it would look like this:

14 ,M0081,+000000008,200204,+00000100500,
14 ,M0081,+000000000,200205,+00000100500,
14 ,M0081,+000000004,200301,+00000100500,
14 ,M0081,+000000001,200302,+00000100500,
14 ,M0081,+000000005,200305,+00000100500,


I'm looking at sort -k but haven't got it yet
or something with sort -t, ?

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top