From: bame@riverrock.org
To: parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] glibc build fails / bash bug
Date: Sun, 12 Nov 2000 13:27:32 -0700 [thread overview]
Message-ID: <m13v3iu-001Vp3C@chalet> (raw)
In-Reply-To: Your message of "Sun, 12 Nov 2000 11:06:38 MST." <20001112110638.A1005@tausq.org>
= After a lot of digging, I *think* what is at fault is actually bash.
Bash has a bunch of 'set' options, some shell variables, and probably
some compile-time configure options, which affect its behavior, so I'd
compare all those. One possibility is that the bash configure script on
hppa configures bash to be more like Posix, since that's what hp-ux shell
users expect.
The construct in question:
echo "a b c
1 2 3" | while read x1 x2 x3
*depends* on the way echo breaks or doesn't break lines, and the way
read parses them. Often scripts like that also depend on whether
the shell actually makes a new subprocess for the 'while' or it doesn't,
because that determines whether variables set in the loop will still be
set on exit from the loop. While I didn't find a way to make the
construction fail, a safer method (when you get a choice) is to use 'set':
set -- a b c \
1 2 3
while [ $# != 0 ]
do
echo $1 $2 $3
shift 3
done
-Paul "too much shell programming" Bame
prev parent reply other threads:[~2000-11-12 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-12 18:06 [parisc-linux] glibc build fails / bash bug Randolph Chung
2000-11-12 20:27 ` bame [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m13v3iu-001Vp3C@chalet \
--to=bame@riverrock.org \
--cc=parisc-linux@thepuffingroup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.