[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uniq -z
From: |
Pádraig Brady |
Subject: |
Re: uniq -z |
Date: |
Fri, 05 May 2006 13:13:30 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051013) |
Egmont Koblinger wrote:
>Hi,
>
>Plenty of text utilities are able to work with lines terminated by zero
>bytes instead of newlines. "sort" is one example, which has an internal uniq
>support, so "sort -z -u" sorts the input and removes adjacent identical
>zero-terminated strings.
>
>However, standalone "uniq" (5.94) doesn't support this, so I can't perform a
>"uniq" without a "sort" on zero-terminated strings.
>
>It would be nice if "uniq" also had a "-z" option.
>
>
It would be nice.
Also it would be nice to be able to specify fields like one can in sort.
A work around until this gets implemented is:
tr '\0' '\n' | uniq | tr '\n' '\0'
Pádraig.
- uniq -z, Egmont Koblinger, 2006/05/05
- Re: uniq -z,
Pádraig Brady <=