Subject: Re: Another newbie Bash question
From: [email-masked] (Tage Westlund)

30 Oct 1997 16:48:06 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]
Cc: [email-masked]

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
"[email-masked]" with one line of text: "help".