tag 14269 notabug thanks On 04/25/2013 01:10 PM, Bruce Culbertson wrote: > Hi, > > I'm using sort(1) version 8.13 in Ubuntu. It is case-insensitive, which I > think is a bug. For example, it sorts the list "A b C d" as "A b C d", not > as "A C b d". There is a -f option to fold lower case to upper for > comparisons (i.e., to make sort case-insensitive, which seems to be the > default anyway) but no option makes it case-sensitive, which is what I need.
Thanks for the report. However, you have hit a FAQ - sort order is locale dependent, and your system probably has a locale that chose case-insensitive collation. https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021 For a demonstration of how it matters: $ printf 'A\nb\nC\nd\n' | LC_ALL=en_US.utf-8 sort --debug sort: using ‘en_US.utf-8’ sorting rules A _ b _ C _ d _ $ printf 'A\nb\nC\nd\n' | LC_ALL=C sort --debug sort: using simple byte comparison A _ C _ b _ d _ As such, I'm closing this as not a bug, although you may feel free to add additional comments. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
