bug-bash
[Top][All Lists]
Advanced

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

Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)


From: Matthew Story
Subject: Re: read fails on null-byte: v4.1.7 FreeBSD 8.0 (amd64)
Date: Tue, 29 Nov 2011 09:49:20 -0500

On Nov 29, 2011, at 9:39 AM, Chet Ramey wrote:

> On 11/29/11 8:29 AM, Greg Wooledge wrote:
> 
>> [...snip]
> 
> It's possible to have both.  You can handle matching a NUL delimiter and
> skip NUL bytes in the input if the delimiter isn't NUL.

This is exactly the behavior that my patch provides, along with documentation 
of the -d '' terminates input line on '\0' .

>  That allows the
> bash behavior and compatibility with other shells that don't provide `-d'.
> 
> There is already `read -n 1' to read only a single character from the input
> stream.  I don't see much value in translating '\0' to 0 for `-d'.

Fair point.




reply via email to

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