[Top][All Lists]

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

Re: Command substitution with null bytes generates warning

From: Chet Ramey
Subject: Re: Command substitution with null bytes generates warning
Date: Mon, 19 Sep 2016 15:45:25 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 9/19/16 2:41 PM, Greg Wooledge wrote:

> Bash has only three choices that I can think of: it can silently drop the
> NUL bytes (4.3 behavior), it can drop ALL of the bytes and return an
> error, or it can drop the NUL bytes with a warning (4.4 behavior).

There is a fourth choice: terminate the string read from the command
substitution at the first NUL.  Pretty sure nobody wants that, even
though that's what would happen if bash didn't drop the NULs.

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

reply via email to

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