Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11620

Re: read and env variables + POSIX => SEGFAULT

From Linda Walsh <bash@tlinx.org>
Newsgroups gnu.bash.bug
Subject Re: read and env variables + POSIX => SEGFAULT
Date 2015-10-11 14:50 -0700
Message-ID <mailman.103.1444600249.7904.bug-bash@gnu.org> (permalink)
References <CAAZkfoJuwe4o1rPQrfB-vxqeAaBX-=9NPWgv2uiOPdHq7L8g+g@mail.gmail.com> <5619D0F1.6080904@tlinx.org> <20151011105924.GA74682@MacGeir>

Show all headers | View raw



Geir Hauge wrote:
> On Sat, Oct 10, 2015 at 08:01:05PM -0700, Linda Walsh wrote:
>> # this is odd: 2vars with content for 2:
>>> unset a b
>>> a= b= read a b <<< x y
>>> declare -p a b
>> declare -- a="x"
>> declare -- b=""
>>
>> # -- where did "y" go?
> 
>     read a b <<< x y
> is the same as
>     read a b y <<< x
> 
> If you escape the space, to make it literal instead of syntactical, you'll get
> the expected result:
> 
>     $ a= b= read a b <<< x\ y
>     $ declare -p a b
>     declare -- a="x"
>     declare -- b="y"
---
	Was sorta meant as a rhetorical Question in the batch
of examples that seem to have differing behavior -- but especially
in contrast with the POSIX versions that dump core.

Bad-syntax shouldn't yield Segmentation Violations...


Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: read and env variables + POSIX => SEGFAULT Linda Walsh <bash@tlinx.org> - 2015-10-11 14:50 -0700

csiph-web