Article View: gnu.bash.bug
Article #526weird bash behavior
From: Michael Elbel
Date: Fri, 01 Sep 1989 13:41
Date: Fri, 01 Sep 1989 13:41
47 lines
1502 bytes
1502 bytes
I have two problems with bash, maybe they are not local to our systems here
1.
Try the following thing:
foo() {
read zoom
read boom < /dev/tty
echo $zoom $boom
}
As long as you run it without input redirection, everything is fine.
But if you do something like
cat >/tmp/bar
frob
net
^D
giving you a two line file and feed that into 'foo'
foo </tmp/bar
I now expect to be able to write something in variable $boom from my keyboard
(/bin/sh accepts it). But nope, bash gives me the line
frob net
and quits.
2.
There seems to be no way to cancel the actual input line with 'intr' as in
sh or ksh. This is especially annoying if you are some levels deep in
'if', 'while' and so on clauses and want to get out, or you have hit some
unknown quoting character(s) bash keeps on prompting $PS2 till you
complete the syntax (or loose your mind).
Has anybody ran into the same problems ?
Michael
#include <usual_excuse_about_bad_english>
--
Michael Elbel, PCS Computer Systeme, Muenchen
(me@dude.PCS.COM for the World), (me@dude.PCS.DE for Europe)
Technical Details
Message-ID:
<ME.89Sep1144112@dude.pcs.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!ginosko!uunet!mcsun!unido!pcsbst!meShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!ginosko!uunet!mcsun!unido!pcsbst!me From: me@dude.pcs.com (Michael Elbel) Newsgroups: gnu.bash.bug Subject: weird bash behavior Message-ID: <ME.89Sep1144112@dude.pcs.com> Date: 1 Sep 89 13:41:12 GMT Sender: news@pcsbst.UUCP Distribution: gnu Organization: PCS GmbH, Pfaelzer-Wald-Str. 36, 8000 Muenchen 90; West-Germany Lines: 47