bug-coreutils
[Top][All Lists]
Advanced

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

Re: uniq works not correct


From: Eric Blake
Subject: Re: uniq works not correct
Date: Mon, 08 Sep 2008 06:12:48 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to address@hidden on 9/7/2008 7:55 AM:
> Hallo,
> 
> i have more scripts, that working under Suse9.0 very fine,
> but under Suse11.0 it`s not a same.

This is probably due to a different default locale between your two
installations, and not a bug in the coreutils.

> 
> Suse11.0 example:
> 
> wc -l test
> 45 test
> sort test test|uniq -u|wc -l
> 30

Again, if locales are the culprit, then this is probably due to sort not
sorting the file in a manner where uniq sees identical lines next to one
another (perhaps because the locale ignores case or punctuation).  This is
a FAQ:
http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021

Try again with LC_ALL=C set in your environment, to see the difference.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjFFsAACgkQ84KuGfSFAYC4VACfU/53++51K6mUjdxq/BPmn167
B3wAnjyeUMB5dZ9zG8vttNajHdvM1qWt
=H5hi
-----END PGP SIGNATURE-----




reply via email to

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