Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!ncs.dnd.ca!marwood From: marwood@ncs.dnd.ca (Gordon Marwood) Newsgroups: comp.unix.questions Subject: Shell Programming Question - sort Message-ID: <751@ncs.dnd.ca> Date: 3 Mar 90 04:39:07 GMT Reply-To: marwood@ncs.dnd.ca (Gordon Marwood) Organization: DREO, Ottawa, Ontario Lines: 12 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@ncs.dnd.ca