bug-bash
[Top][All Lists]
Advanced

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

Re: Command substitution with null bytes generates warning


From: L. A. Walsh
Subject: Re: Command substitution with null bytes generates warning
Date: Mon, 19 Sep 2016 10:37:33 -0700
User-agent: Thunderbird



Greg Wooledge wrote:
On Mon, Sep 19, 2016 at 09:28:53AM -0700, L. A. Walsh wrote:
   Could you change it back or provide a way to suppress "kiddy-scripter"
seatbelts?

address@hidden:~$ x=$(< /proc/$$/cmdline)
bash-4.4: warning: command substitution: ignored null byte in input
address@hidden:~$ x=$(< /proc/$$/cmdline 2>/dev/null)
----
   Not useful:

1) it requires finding all scripts that have the problem and creating new
versions of such, testing that something else didn't break.

    1a) it requires finding all the locations in those scripts.  Not all
will be obvious as some may only be triggered under specific circumstances.

2) It suppresses all warnings -- it isn't just suppressing the new warning, but all warnings and messages. That's generally considered "bad practice". I'm surprised you would suggest such a hack.







reply via email to

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