Subject: Re: Bash bug wth read
From: [email-masked] (Peter Dalgaard BSA)

28 Jan 1997 02:56:02 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
	<[email-masked]>
Original-To: [email-masked]
In-Reply-To: Shankar Unni's message of Mon, 27 Jan 1997 10:16:51 -0800
X-Mailer: Gnus v5.2.40/Emacs 19.34
Original-Sender: [email-masked]

Shankar Unni <[email-masked]> writes:

> 
> Running "./script < /dev/tty" gives:
> 
> one:
> two: <wait for return>
> three: <wait for return>
> four: <wait for return>
> 
> etc.
> 
> The first one suggests that someone's shoving a "<cr><nl>" down the pipe
> when starting up. Also, when the user hits <return>, a "<cr><nl>" is
> being sent that gets interpreted as two EOLs.
> 
> The second one suggests that when reading directly from /dev/tty,
> somehow, things are being cooked properly (<cr><nl> -> <nl>), but that
> the initial <cr><nl> down the pipe is still happening..

This makes it almost certain that the problem is that readline is not
cooking properly. Either it should explicitly gobble LF-after-CR, or
there's somthing wrong with the tty controls. 

On unixen, "cmd < /dev/tty" is not making any visible difference; why
does it do it here?

What happens if you execute "bash < /dev/tty" and *then* ./script ?  

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - ([email-masked])             FAX: (+45) 35327907
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".