Mail Archives: cygwin/1998/06/07/17:27:27
It's a bug that hasn't been resolved as yet. Use ^Z or ^J to enter
the data instead of enter.
---Erik Pessers <Erik DOT Pessers AT skynet DOT be> wrote:
>
> Hi,
>
> I have a problem I hope some-one can help me solving.
>
> When executing a BASH script from the BASH shell (B19) on my Windows95
> PC, I get extra end of lines on a BASH "read" command..
>
> So, in a script like
>
>
> > echo -n "[Var 1] : "
> > read var1
> > echo -n "[Var 2] : "
> > read var2
> > echo -n "[Var 3] : "
> > read var3
> > echo -n "[Var 4] : "
> > read var4
> > echo " Var 1 = $var1 ; Var 2 = $var2"
> >
> > echo " Var 3 = $var3 ; Var 4 = $var4"
> >
> >
>
> I fail to enter data for $var2: when entering a response to the first
> read,
> I seem to generate an extra <CR><LF> that is read on the second query.
> The second "read" for $var2 is "automatically" answered, and $var2
> is effectively empty.
>
> I can then again enter a response for $var3; and get an extra <CR><LF>
> to leave me with an empty $var4.
>
> I tried terminating a response with just CTRL-J, but this did not
solve
> the issue.
>
> When executing the same script under Linux/Bash rather than
Win95/Cygwin
> bash,
> it runs OK.
>
> I scanned the mailing list archive, and found this question being
> asked several times, but I could not find a solution.
>
> Can anyone please help me in this? The problem as it is prevents me
> from eg. executiong "sh configure" scripts, which is quite annoying.
>
> Thanks in advance !
>
> --
>
>
> Cheers, Erik
>
>
>
<HR>
<HTML>
Hi,
<P>I have a problem I hope some-one can help me solving.
<P>When executing a BASH script from the BASH shell (B19) on my
Windows95
<BR>PC, I get extra end of lines on a BASH "read" command..
<P>So, in a script like
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>echo -n "[Var 1] : "
read var1
echo -n "[Var 2] : "
read var2
echo -n "[Var 3] : "
read var3
echo -n "[Var 4] : "
read var4
echo " Var 1 = $var1 ; Var 2 = $var2"</PRE>
<PRE>echo " Var 3 = $var3 ; Var 4 = $var4"</PRE>
</BLOCKQUOTE>
<P>I fail to enter data for $var2: when entering a response to the first
read,
<BR>I seem to generate an extra <CR><LF> that is read on the second
query.
<BR>The second "read" for $var2 is "automatically" answered, and $var2
<BR>is effectively empty.
<P>I can then again enter a response for $var3; and get an extra
<CR><LF>
<BR>to leave me with an empty $var4.
<P>I tried terminating a response with just CTRL-J, but this did not
solve
the issue.
<P>When executing the same script under Linux/Bash rather than
Win95/Cygwin
bash,
<BR>it runs OK.
<P>I scanned the mailing list archive, and found this question being
<BR>asked several times, but I could not find a solution.
<P>Can anyone please help me in this? The problem as it is prevents me
<BR>from eg. executiong "sh configure" scripts, which is quite annoying.
<P>Thanks in advance !
<P>--
<BR>
<P>Cheers, Erik
<BR>
<BR> </HTML>
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -