Re: Bash bug in variable assignment/echo/grep -q

2016-06-21 Thread Roel Van de Paar
Got it, thanks On Wed, Jun 22, 2016 at 12:21 PM, Chet Ramey wrote: > On 6/21/16 9:35 PM, Roel Van de Paar wrote: > > > Bash Version: 4.2 > > Patch Level: 46 > > Release Status: release > > > > Description: > > DONE=0 at the end of the 'Repeat-By' script - should be 1 ? > > > > Repeat-By:

Re: Bash bug in variable assignment/echo/grep -q

2016-06-21 Thread Chet Ramey
On 6/21/16 9:35 PM, Roel Van de Paar wrote: > Bash Version: 4.2 > Patch Level: 46 > Release Status: release > > Description: > DONE=0 at the end of the 'Repeat-By' script - should be 1 ? > > Repeat-By: > LINE='test'; DONE=0; echo ${LINE} | if grep -q 'test'; then DONE=1; > echo "

Bash bug in variable assignment/echo/grep -q

2016-06-21 Thread Roel Van de Paar
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-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -

Re: IGNOREEOF and POSIXLY_CORRECT don't ignore invisible vars

2016-06-21 Thread Greg Wooledge
On Mon, Jun 20, 2016 at 06:42:57PM -0700, L. A. Walsh wrote: > The local, it seems is sets the local attrib to any future references > of set/unset. Otherwise, it seems you'd have the situation of > local Psx_Cor; unset Psx_Cor, where the "unset", counterintuitively, > would unset the global, and