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
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