This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Another newbie Bash question
- To: jmamer at anderson dot ucla dot edu
- Subject: Re: Another newbie Bash question
- From: Tage Westlund <tage dot westlund at stockholm dot mail dot telia dot com>
- Date: Fri, 31 Oct 1997 01:57:31 -0100
- CC: gnu-win32 at cygnus dot com
- Organization: G-LOGIKMETODER
- References: <Pine.HPP.3.95q.971030001315.26505A-100000@risc.anderson.ucla.edu>
- Reply-To: tage dot westlund at stockholm dot mail dot telia dot com
John Mamer wrote:
>
> #!/bin/sh
> echo -n "First variable: "
> read VAR1
> echo -n "Secnd variable: "
>
> it reads the first variable, and then skips
> through the second two reads.
> Is there some way to flush the keyboard buffer between
> reads?
To John!
There is a simple "flush":
echo -n First variable:
read VAR1; read
echo -n Secnd variable:
read VAR2; read
echo -n Third variable:
read VAR3; read
echo "The variables were: $VAR1 $VAR2 $VAR3"
Tage
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".