Shell Programming Question - sort

Gordon Marwood marwood at ncs.dnd.ca
Sat Mar 3 15:39:07 AEST 1990


I am trying to sort (using "sort" in Ultrix) based on the last two
characters in a line (which are numeric).  There are a variable number
of characters in a line, and these last two characters are preceded by a
space, there are also a variable number of spaces in a line, so the
number of fields will be variable if space is used as the field
separator.  None of my available texts gives me a clue as to whether a
sort can be done based on the last field in a line, regardless of the
number of fields in the line.  Is there any "sort" option that can 
do this ?

Gordon Marwood
Internet: marwood at ncs.dnd.ca



More information about the Comp.unix.questions mailing list