help-bash
[Top][All Lists]
Advanced

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

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


From: Philip Van-Houtte
Subject: [Help-bash] Question :: bash read with timeout only works once?
Date: Fri, 4 Oct 2013 18:35:55 -0400

**

Hello,



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...



e.g.

*#/bin/bash*

**

*read -p "Enter first value : " -t 5 X*

*read -p "Enter second value : " -t 5 Y*

**

*exit 0*



When executed:



> ./s3.sh
Enter first value : Enter second value



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



Thank You



Philip



**

**


reply via email to

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