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]

Extra newline with bash read?



My shell scripts that use "read" to get user input aren't working.   
 Here's a simple example:

 #!/bin/sh
 echo -n "input a1: "
 read a1
 echo -n "input a2: "
 read a2
 echo "a1 = " $a1
 echo "a2 = " $a2

It doesn't wait for input at "read a2" and a2 doesn't get set.  Is the   
"Enter"
key being read as a <CR/NL> pair?  Is there a fix?

Thanks,
Tony Richardson
arichard@stark.cc.oh.us
-
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]