[Top][All Lists]

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

Command substitution with null bytes generates warning

From: Eric Pruitt
Subject: Command substitution with null bytes generates warning
Date: Thu, 15 Sep 2016 22:51:22 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' 
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g -O2 
-Wno-parentheses -Wno-format-security
uname output: Linux sinister 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 
(2016-09-03) x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.4
Patch Level: 0
Release Status: release

        I have a script that execute `if [[ "$(<"/proc/$1/cmdline")" = tmux* 
        All /proc/*/cmdline include null bytes, and as of Bash 4.4, this 
results in
        a warning being spewed on stderr which did not happen in Bash 4.3.

        echo "$(<"/proc/$$/cmdline")"

        Is this even an intentional change? I looked at some of the other
        internal_warning invocations, and they were commented out using "#if 0 

reply via email to

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