TITLE : sort command does not sort numeric fields correctly. OS LEVEL : AIX DATE : 18/05/99 VERSION : 1.0 ---------------------------------------------------------------------------- Below is the output form the command sort, notice that the first field which is numeric has been sorted by the first character onwards and not as a numeric value :- 105 17 May 13:30 lp15 135 28 Nov 1997 lp42 140 27 Nov 1997 lp41 145 27 Nov 1997 lp43 150 27 Nov 1997 lp44 157 27 Nov 1997 lp49 159 28 Nov 1997 lp40 16 09 Jan 1998 lp02 16 17 May 14:05 lp10 163 28 Nov 1997 lp46 167 28 Nov 1997 lp47 24 13 May 16:43 lp11 26 17 May 14:02 lp0 32 09 Jan 1998 lp03 48 09 Jan 1998 lp05 50 09 Jan 1998 lp00 56 09 Jan 1998 lp06 63 17 May 13:30 lp1 64 09 Jan 1998 lp08 71 09 Jan 1998 lp09 80 17 May 13:37 lp12 85 17 May 14:19 lp13 Check the environmental variable $LANG. If the $LANG variable is en_GB then the sort command acts as above, BUT if the $LANG variable is set to en_US then the sort command gives the following results :- 16 09 Jan 1998 lp02 16 17 May 14:05 lp10 24 13 May 16:43 lp11 26 17 May 14:02 lp0 32 09 Jan 1998 lp03 48 09 Jan 1998 lp05 50 09 Jan 1998 lp00 56 09 Jan 1998 lp06 63 17 May 13:30 lp1 64 09 Jan 1998 lp08 71 09 Jan 1998 lp09 80 17 May 13:37 lp12 85 17 May 14:19 lp13 105 17 May 13:30 lp15 135 28 Nov 1997 lp42 140 27 Nov 1997 lp41 145 27 Nov 1997 lp43 150 27 Nov 1997 lp44 157 27 Nov 1997 lp49 159 28 Nov 1997 lp40 163 28 Nov 1997 lp46 167 28 Nov 1997 lp47