Subject: Another newbie Bash question
From: [email-masked] (John Mamer)

30 Oct 1997 01:31:58 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: [email-masked]

Hi All!

I have yet another question.  Consider the following simple 
shell script:

#!/bin/sh
echo -n "First variable: "
read VAR1
echo -n "Secnd variable: "
read VAR2
echo -n "Third variable: "
read VAR3
echo "The variables were: $VAR1 $VAR2 $VAR3"
 
On my NT box this runs just fine.  On my win95 box
it does not, it reads the first variable, and then skips
through the second two reads.  It "feels" as if it's getting
spurious input either from a buffer that has trash in it, or
from a keyboard interrupt or something.......
Is there some way to flush the keyboard buffer between
reads?

Any ideas about what I'm doing wrong?  I've mounted the file 
system as binary, and am using Mr. Okhapkin's latest
cygwin.dll and libraries. The script file itself is a
unix-style file (no carriage returns).  I tried setting 
CYGWIN_TTY, but that didn't do any good either.

Any light you can shed on this would be greatly appreciated.

john

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".