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: Greg Wooledge
Subject: Re: Command substitution with null bytes generates warning
Date: Mon, 19 Sep 2016 12:58:21 -0400
User-agent: Mutt/1.4.2.3i

On Mon, Sep 19, 2016 at 09:28:53AM -0700, L. A. Walsh wrote:
>    If users were relying on this behavior (I know I have scripts that read
> things from proc -- a text interface that uses \0 to display values similar
> to MS's multi-string Values in the Windows registry.

>    Could you change it back or provide a way to suppress "kiddy-scripter"
> seatbelts?

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

Voila.



reply via email to

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