[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Uniq identical lines not matching
From: |
Christopher Maier |
Subject: |
Re: [Help-bash] Uniq identical lines not matching |
Date: |
Fri, 19 Feb 2016 16:26:46 +0000 |
Hi,
Is there a mailing list / help group for specifically the uniq command?
address@hidden:~> uniq --version
uniq (GNU coreutils) 8.12
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Richard M. Stallman and David MacKenzie.
Thanks,
Kit
-----Original Message-----
From: Eric Blake [mailto:address@hidden
Sent: Thursday, February 18, 2016 12:34 AM
To: konsolebox <address@hidden>; Christopher Maier <address@hidden>;
address@hidden
Subject: Re: [Help-bash] Uniq identical lines not matching
On 02/17/2016 10:41 PM, konsolebox wrote:
>> Quite sure this is a problem within uniq, not bash:
>
> Confirmed:
>
> # echo 'aabaaa' | sed 's|b|\xFF|g' | awk '{print $1; print $1; print
> $1; print $1; print $1;}' | uniq -c
> 5 aa aaa
>
> It could be a problem with uniq itself, or maybe the locale.
Most likely with the locale and/or downstream patches that attempt to add
multibyte support to coreutils which are not present in upstream.
[Side note: you can test the same thing with less typing:] # yes $(printf
'aa\xffaaa') | head -n5 | uniq -c
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Nothing in this message is intended to constitute an electronic signature
unless a specific statement to the contrary is included in this message.
Confidentiality Note: This message is intended only for the person or entity to
which it is addressed. It may contain confidential and/or privileged material.
Any review, transmission, dissemination or other use, or taking of any action
in reliance upon this message by persons or entities other than the intended
recipient is prohibited and may be unlawful. If you received this message in
error, please contact the sender and delete it from your computer.