coreutils
[Top][All Lists]
Advanced

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

Re: stdbuf feature request - line buffering but for null-terminated data


From: Pádraig Brady
Subject: Re: stdbuf feature request - line buffering but for null-terminated data
Date: Sun, 10 Mar 2024 09:37:57 +0000
User-agent: Mozilla Thunderbird

On 09/03/2024 16:30, Zachary Santer wrote:
'stdbuf --output=L' will line-buffer the command's output stream.
Pretty useful, but that's looking for newlines. Filenames should be
passed between utilities in a null-terminated fashion, because the
null byte is the only byte that can't appear within one.

If I want to buffer output data on null bytes, the closest I can get
is 'stdbuf --output=0', which doesn't buffer at all. This is pretty
inefficient.

0 means unbuffered, and Z is already taken for, I guess, zebibytes.
--output=N, then?

Would this require a change to libc implementations, or is it possible now?

This does seem like useful functionality,
but it would require support for libc implementations first.

cheers,
Pádraig



reply via email to

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