Package: coreutils
Version: 8.13-3
Severity: normal
File: /usr/bin/sort

Hello,

I may be doing something wrong here, but it seems to me that sort is
ignoring my secondary sort key:

$ cat sample
unknown_26:471000000:3
WXTV:225000000:541
WWOR_HD:465000000:1
WWOR:225000000:509
WTBS:429000000:450
WPIX:225000000:511
WNYW:225000000:505
WNJU:225000000:547
WNET_HD:453000000:2
WNET:225000000:513
WNBC_HD:471000000:1
WNBC:225000000:504
WFUT:225000000:568
WCBS_HD:453000000:1
WCBS:225000000:502
WABC_HD:471000000:2
WABCDT3:471000000:16
WABC:225000000:507
VME:453000000:4
TVGN:435000000:470
RTTV:135000000:303
PBSKIDS:453000000:3
NY1:435000000:468
CSPAN3:351000000:115
BONTV:219000000:84
$ sort -ns -t: -k2,3 < sample
RTTV:135000000:303
BONTV:219000000:84
WXTV:225000000:541
WWOR:225000000:509
WPIX:225000000:511
WNYW:225000000:505
WNJU:225000000:547
WNET:225000000:513
WNBC:225000000:504
WFUT:225000000:568
WCBS:225000000:502
WABC:225000000:507
CSPAN3:351000000:115
WTBS:429000000:450
TVGN:435000000:470
NY1:435000000:468
WNET_HD:453000000:2
WCBS_HD:453000000:1
VME:453000000:4
PBSKIDS:453000000:3
WWOR_HD:465000000:1
unknown_26:471000000:3
WNBC_HD:471000000:1
WABC_HD:471000000:2
WABCDT3:471000000:16
$ 

As you can see, it sorts correctly by the second field, but the lines are
still out of order with respect to the third field.

Please let me know if I'm doing something wrong here.
--Joe

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages coreutils depends on:
ii  dpkg          1.16.1.2
ii  install-info  4.13a.dfsg.1-8
ii  libacl1       2.2.51-5
ii  libattr1      1:2.4.46-5
ii  libc6         2.13-24
ii  libselinux1   2.1.0-4

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to