Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11620
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Linda Walsh <bash@tlinx.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: read and env variables + POSIX => SEGFAULT |
| Date | Sun, 11 Oct 2015 14:50:15 -0700 |
| Lines | 33 |
| Approved | bug-bash@gnu.org |
| 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> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1444600249 14113 208.118.235.17 (11 Oct 2015 21:50:49 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash <bug-bash@gnu.org> |
| To | Geir Hauge <geir.hauge@gmail.com> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Thunderbird |
| In-Reply-To | <20151011105924.GA74682@MacGeir> |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] |
| X-Received-From | 173.164.175.65 |
| 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:11620 |
Show key headers only | 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
Re: read and env variables + POSIX => SEGFAULT Linda Walsh <bash@tlinx.org> - 2015-10-11 14:50 -0700
csiph-web