This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Another newbie Bash question



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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]