help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Uniq identical lines not matching


From: Eric Blake
Subject: Re: [Help-bash] Uniq identical lines not matching
Date: Wed, 17 Feb 2016 23:33:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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