This works on my admittedly small test set:

        :%!sort -k3 -t/

You're making several unstated assumptions.

(1) The records are already sorted by month and day.

I would have thought that, too, but sorting this:

01/04/2007 blah
01/03/2007 blah
12/30/2006 blah
07/05/2003 blah
02/04/2007 blah
02/04/2006 blah
14/32/1996 blah
02/04/1996 blah

give this:

02/04/1996 blah
14/32/1996 blah
07/05/2003 blah
02/04/2006 blah
12/30/2006 blah
01/03/2007 blah
01/04/2007 blah
02/04/2007 blah

which, as you can see, has sorted by month and day, too, or is that just happenstance?

(3) Everything to the right of the year is the same in each
   record.

Ah, I see why. My example sorts beginning at that column, not just on that column alone.

--

.

Reply via email to