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"

Reply via email to