[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command substitution with null bytes generates warning
From: |
Greg Wooledge |
Subject: |
Re: Command substitution with null bytes generates warning |
Date: |
Mon, 19 Sep 2016 14:41:37 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Mon, Sep 19, 2016 at 11:30:56AM -0700, Linda Walsh wrote:
> How about, w/r/t the new warning -- I complain because the null bytes
> are missing after bash knowingly detected them and illegally modified
> the input. Putting out a warning about null bytes, doesn't mean it's
> "ok" to drop them. Now it's just compounded with an anti-unix (silence
> is golden) warning message.
Bash *cannot* store the NUL bytes in the result of a command substitution.
It's completely impossible. Calling that an "illegally modified input"
is disingenuous.
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).
I understand that you, personally, prefer the 4.3 behavior, and that
you want Chet to change it back.
Well, I'm not Chet, and I can't change it back for you, but I can give
you a workaround to suppress the warning. That's what I did.
- Command substitution with null bytes generates warning, Eric Pruitt, 2016/09/16
- Re: Command substitution with null bytes generates warning, Greg Wooledge, 2016/09/16
- Re: Command substitution with null bytes generates warning, Chet Ramey, 2016/09/17
- Re: Command substitution with null bytes generates warning, L. A. Walsh, 2016/09/19
- Re: Command substitution with null bytes generates warning, Greg Wooledge, 2016/09/19
- Re: Command substitution with null bytes generates warning, L. A. Walsh, 2016/09/19
- Re: Command substitution with null bytes generates warning, Eric Blake, 2016/09/19
- Re: Command substitution with null bytes generates warning, Linda Walsh, 2016/09/19
- Re: Command substitution with null bytes generates warning,
Greg Wooledge <=
- Re: Command substitution with null bytes generates warning, Linda Walsh, 2016/09/19
- Re: Command substitution with null bytes generates warning, Chet Ramey, 2016/09/19
- Re: Command substitution with null bytes generates warning, L. A. Walsh, 2016/09/19
- Re: Command substitution with null bytes generates warning, Greg Wooledge, 2016/09/19
- Re: Command substitution with null bytes generates warning, Chet Ramey, 2016/09/20
- Re: Command substitution with null bytes generates warning, L. A. Walsh, 2016/09/20
- Re: Command substitution with null bytes generates warning, Greg Wooledge, 2016/09/20
- Re: Command substitution with null bytes generates warning, L. A. Walsh, 2016/09/20
- Re: Command substitution with null bytes generates warning, Greg Wooledge, 2016/09/20
- Re: Command substitution with null bytes generates warning, L. A. Walsh, 2016/09/20