bug-bash
[Top][All Lists]
Advanced

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

Re: Regression -- can't read input w/stderr redirect


From: Chet Ramey
Subject: Re: Regression -- can't read input w/stderr redirect
Date: Sun, 18 Jun 2017 20:02:11 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 6/18/17 6:59 PM, L A Walsh wrote:
> 
> 
> Chet Ramey wrote:
>> Bash has always stripped NULL bytes. Now it tells you it's doing it.
> Why?  Did I toggle a flag asking for the warning?  Seems like it
> was sorta sprung on users w/no way to disable it.

Users asked why bash transformed input without warning, even though it
had been doing that it's entire lifetime. A warning is appropriate.

>>  
>>> Side question: Why display that message if there are only
>>> NUL's at the end?  I would think it normal for bash to
>>> use and read NUL terminated strings.      
>>
>> This is very uncommon. Most Unix utilities use newline-terminated
>> lines.
>>   
> ----
>    But things are changing -- people have asked for zero-terminated read's
> and readarrays.  More unix utils are offering NUL termination as an option
> because newlines alone don't cut it in some instances.

And bash provides mechanisms to deal with the relatively few use cases
where it is a problem.

Recall that the only thing that has changed is that bash now provides a
warning about what it's doing.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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