coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sort --stable (-s) doesn't appear to work on my system


From: Terry Farrah
Subject: sort --stable (-s) doesn't appear to work on my system
Date: Tue, 8 Dec 2015 13:26:33 -0800

I have a tab-separated file that I think is already sorted on the first 3 columns. Here is a 2-line sample in a file named foo:

chr10   60379   60380   10:60380-60380  T/T
chr10   60379   60380   10:60380-60380  G/T

I try checking it with

sort -s -k1,1V -k2,2n -k3,3n -c foo

but the check fails:

sort: foo:2: disorder: chr10      60379   60380   10:60380-60380  G/T

If I sort it using the above key specification, it swaps the order of the lines:

sort -s -k1,1V -k2,2n -k3,3n foo

chr10   60379   60380   10:60380-60380  G/T
chr10   60379   60380   10:60380-60380  T/T

Here it is with --debug:

$ sort -s -k1,1V -k2,2n -k3,3n --debug foo
sort: using ‘en_US.UTF-8’ sorting rules
sort: leading blanks are significant in key 1; consider also specifying 'b'
chr10>60379>60380>10:60380-60380>G/T
_____
      _____
            _____
chr10>60379>60380>10:60380-60380>T/T
_____
      _____
            _____


Here is some info about what I'm running:

$ sort --version
sort (GNU coreutils) 8.22
$ more /etc/*-release
::::::::::::::
/etc/oracle-release
::::::::::::::
Oracle Linux Server release 7.1
$ uname -r
3.8.13-68.1.2.el7uek.x86_64

Many thanks for your help!

Terry

--------
Terry Farrah
Bioinformatics Scientist
Institute for Systems Biology
206-732-1348

reply via email to

[Prev in Thread] Current Thread [Next in Thread]