[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error with ' in command substitution
From: |
Eric Blake |
Subject: |
Re: error with ' in command substitution |
Date: |
Tue, 30 Oct 2007 18:58:10 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Scott Moser on 10/30/2007 7:12 AM:
> #===== test.sh =====
> x=$(cat <<"EOF"
> bad' syntax
> EOF
> )
>
> So, I'm not 100% certain what the "correct" behavior is, but it
> certainly seems like this should work.
POSIX requires this to work when inside $(), but leaves it unspecified
when inside ``. Yes, all released versions of bash are buggy when it
comes to 100% compliance to the POSIX rules for $() parsing (and more
annoyingly, with different bugs as you move from 3.1 to 3.2).
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHJ9Mh84KuGfSFAYARAppMAKCWFzg82nmRlT7We25GyH0q/egI0wCZASdj
gw94rDf1y2VM5e7JmkwqiJU=
=GwLt
-----END PGP SIGNATURE-----