help-bash
[Top][All Lists]
Advanced

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

[Help-bash] Uniq identical lines not matching


From: Christopher Maier
Subject: [Help-bash] Uniq identical lines not matching
Date: Wed, 17 Feb 2016 23:48:12 +0000

Hi,

I've run into an odd problem with uniq, which I've simplified to the below 
example. When trying to remove duplicates from identical consecutive text lines 
where there is a special byte like \xFF, it does not consider most of the lines 
to be identical and passes them through. What could be causing this?

address@hidden:~> echo $BASH_VERSION
3.2.51(1)-release

address@hidden:~> echo 'aabaaa' | sed 's|b|\xFF|g' | awk '{print $1; print $1; 
print $1; print $1; print $1;}' | uniq -c
      2 aaÿaaa
      1 aaÿaaa
      1 aaÿaaa
      1 aaÿaaa

Thanks,
Kit



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.


reply via email to

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