bash: "read -p MY_PROMPT ANS" not always flushing MY_PROMPT text to STDOUT
tmpaddr31@trodman.com
tmpaddr31@trodman.com
Thu Apr 24 15:24:00 GMT 2003
bash script snippet (1.3.20; CYGWIN set to "binmode tty ntsec" ):
#prompt text in some cases does not show up:
read -p "pls enter your answer here > " ANSWER
#this workaround has never failed:
echo -n "pls enter your answer here > "
read ANSWER
We're upgrading from a very old version of cygwin and are finding
we have to adjust perl and bash scripts with workarounds
; in general the scripts are supposed to be sending
text to STDOUT just prior to prompting for user input- this
prompt text is not always showing up.
I searched the mailing list for similiar issues and came up with
several near matches, but not specifically with bash. Like another
poster I had to adjust a perl script to force it to flush a
print to STDOUT ("tell STDOUT ;" seemed to fix it).
The bash problem is buried in a fairly involved set of scripts, and
I have not been able to come up with a simplied case that
exhibits the bug- don't have the time now. When time permits
I will send a test case.
Thanks as always for cygwin!
--
regards,
Tom Rodman
perl -e 'print unpack("u", "\.\=\$\!T\<F\]D\;6\%N\+F\-O\;0H\`");'
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list