to: [EMAIL PROTECTED]
The "sort" command ignores a leading dash ("-") in a context
where it should be significant. When the dash is replaced with
an "X", the character is no longer ignored.
The following demonstrates the behaviors on new Red Hat 6.1 box
and also on a legacy Sun 4/75, where the dash is not ignored.
I have tried without success to find command options which will
allow the dash to be treated as significant.
Odell Hegna
[EMAIL PROTECTED]
--------------------------------------------------
Red Hat Linux release 6.1 (Cartman)
Kernel 2.2.12-20 on an i686
login: xxxxxxxx
Password:
Last login: Fri May 19 09:08:57 on tty1
lotan -> cat sort-data1
-100100BFGA A9P50NQA4100P *********
100100BFEA 09P50NMD2700MP 000003669
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
lotan -> sort -t : -k 1.1,1.12 sort-data1
100100BFEA 09P50NMD2700MP 000003669
-100100BFGA A9P50NQA4100P *********
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
lotan -> cat sort-data2
X100100BFGA A9P50NQA4100P *********
100100BFEA 09P50NMD2700MP 000003669
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
lotan -> sort -t : -k 1.1,1.12 sort-data2
100100BFEA 09P50NMD2700MP 000003669
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
X100100BFGA A9P50NQA4100P *********
lotan 15:27:43 -> exit
logout
SunOS UNIX (rbcrg)
login: xxxxxxxx
Password:
Last login: Fri May 19 15:51:14 from berk29pc
SunOS Release 4.1.3 (WODAN) #1: Sat Nov 21 05:50:44 CST 1992
rbcrg 518-> cat sort-data1
-100100BFGA A9P50NQA4100P *********
100100BFEA 09P50NMD2700MP 000003669
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
rbcrg 519-> sort -t: +0.0 -0.13 sort-data1
-100100BFGA A9P50NQA4100P *********
100100BFEA 09P50NMD2700MP 000003669
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
rbcrg 520-> cat sort-data2
X100100BFGA A9P50NQA4100P *********
100100BFEA 09P50NMD2700MP 000003669
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
rbcrg 521-> sort -t: +0.0 -0.13 sort-data2
100100BFEA 09P50NMD2700MP 000003669
100100BFGA 09P50NMF2600P 000005602
100100BFGA A9P50NQA4100P 000005602
100100BFHA A9P50NQA4000 000009117
X100100BFGA A9P50NQA4100P *********
rbcrg 522-> exit
logout