bug-coreutils
[Top][All Lists]
Advanced

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

Re: feature request: zero-terminated lines for comm


From: Pádraig Brady
Subject: Re: feature request: zero-terminated lines for comm
Date: Mon, 10 Sep 2007 14:52:30 +0100
User-agent: Thunderbird 1.5.0.8 (X11/20061116)

Pádraig Brady wrote:
> Lasse Kliemann wrote:
>> How complicated it would be to add a `-z' or `-0' switch to `comm' in order 
>> to allow zero-terminated "lines"? The `sort' command, for example, allows 
>> this, and this is very useful when dealing with filenames. 
>>
>> Or is such functionality already provided in a different way?
> 
> Probably in future, all coreutils filters
> should take a standard option to specify NUL
> as the item delimiter.
> 
> In the meantime one can work around that,
> albeit with extra data copying, using something like:
> 
> tr '\n' '\1' |
> comm |
> tr '\1' '\n'

sigh, I meant the following of course:

tr '\n\0' '\1\n' |
comm |
tr '\1\n' '\n\0'

Pádraig.




reply via email to

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