[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Question :: bash read with timeout only works once?

From: Chris F.A. Johnson
Subject: Re: [Help-bash] Question :: bash read with timeout only works once?
Date: Sat, 5 Oct 2013 12:23:05 -0400 (EDT)
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)

On Fri, 4 Oct 2013, Philip Van-Houtte wrote:


I have a problem with reads using timeouts. Either in shell, sub-shell or
script it seems "read with timeout" will only work once, i.e. if I have
multiple read with timeout statements only the first will be able to
timeout and the second will hang...



*read -p "Enter first value : " -t 5 X*
*read -p "Enter second value : " -t 5 Y*
When executed:

Enter first value : Enter second value

The second read doesn't timeout. This is bash 4.1.0

   I have tried it in 4.1 and 4.2 and both reads timeout in both
   versions of bash, both at the command line and in a script,
   whether in a subshell or not.

Chris F.A. Johnson, <>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]