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


Groups > gnu.bash.bug > #11614

Re: read and env variables + POSIX => SEGFAULT

Path csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail
From Geir Hauge <geir.hauge@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: read and env variables + POSIX => SEGFAULT
Date Sun, 11 Oct 2015 12:59:24 +0200
Lines 24
Approved bug-bash@gnu.org
Message-ID <mailman.83.1444561176.7904.bug-bash@gnu.org> (permalink)
References <CAAZkfoJuwe4o1rPQrfB-vxqeAaBX-=9NPWgv2uiOPdHq7L8g+g@mail.gmail.com> <5619D0F1.6080904@tlinx.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1444561176 25724 208.118.235.17 (11 Oct 2015 10:59:36 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash <bug-bash@gnu.org>
To Linda Walsh <bash@tlinx.org>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=OVaHpzPdY7F8USacRzZlTIvt7COiP+v3GMKixiEx3K4=; b=NKXfx5pcJRTLM+HGtaZsh6SdmYG0ihapoyGmfqL/Nl7hjj/4YXhXj3Q9SyM1GD8nX/ rv13yfLcFj9vYunZpix9GOdWwVjWDKw+/P/Pcg36eeHwOG5+jGuNFathP1KjTAGS8/HE S6OvAbQsFojaxasgUUsqfTgVKOkr/+349QVDxMhbPjDiII9doenm5OndTUNREiNf82QU f4NoUsgXJ1xUFQDCmvZQ4LfXjUH1D3fcPo0Uai+q1iYeOLrsePLDZA9JZw3Od0USBLZP xDJ/jwwDxqcAmjgK9dqStbSx4ZeKC9H0jF3Vc33HKPv6myXJZW3Hg8Byf8QJk+LsIbpQ kOYw==
X-Received by 10.112.204.101 with SMTP id kx5mr10280537lbc.93.1444561167593; Sun, 11 Oct 2015 03:59:27 -0700 (PDT)
Content-Disposition inline
In-Reply-To <5619D0F1.6080904@tlinx.org>
User-Agent Mutt/1.5.23 (2014-03-12)
X-detected-operating-system by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value).
X-Received-From 2a00:1450:4010:c04::22d
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11614

Show key headers only | View raw


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"

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


Thread

Re: read and env variables + POSIX => SEGFAULT Geir Hauge <geir.hauge@gmail.com> - 2015-10-11 12:59 +0200

csiph-web