From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcda7,3228891788e1919a,start X-Google-Attributes: gidfcda7,public X-Google-Thread: fee84,3228891788e1919a,start X-Google-Attributes: gidfee84,public From: urban@cobra.jpl.nasa.gov (Michael P Urban) Subject: Sort keys buggy? Date: 1996/02/28 Message-ID: <1996Feb28.190715.9327@llyene.jpl.nasa.gov>#1/1 X-Deja-AN: 142280657 sender: news@llyene.jpl.nasa.gov organization: Jet Propulsion Laboratory, Pasadena, California newsgroups: comp.sys.hp.hpux,comp.unix.osf.osf1 The output of the command, sort -k 1 -k 2n with an input file like: a 1 a 3 a 4 b 1 b 2 b 3 x 4 y 2 a 10 a 50 b 10 b 20 b 50 z 20 a 25 b 25 does not produce the result I would expect; the second column is sorted lexicographically instead of numerically. This occurs on HP-UX 9.01, HP-UX 10, and DEC OSF1 V3.2. Am I misunderstanding the usage of the -k options, or are the DEC and HP programmers? Mike Urban urban@cobra.jpl.nasa.gov