bug-coreutils
[Top][All Lists]
Advanced

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

Re: uniq -z


From: Egmont Koblinger
Subject: Re: uniq -z
Date: Fri, 5 May 2006 14:34:25 +0200
User-agent: Mutt/1.5.8i

On Fri, May 05, 2006 at 01:13:30PM +0100, Pádraig Brady wrote:

Hi,

> A work around until this gets implemented is:
> tr '\0' '\n' | uniq | tr '\n' '\0'

AFAIK the main point in preferring \0 to \n is that it can safely handle
data that may contain embedded newlines (such as filenames). Your workaround
is only valid as long as the processed data is guaranteed not to contain \n,
in which case choosing \n as delimiter throughout the whole script is most
likely simpler than \0.


bye,

Egmont




reply via email to

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