How to use Bash read with a timeout?
In bash(1), read has a -t option where you can specify a timeout. From the manpage: read [-ers] [-u fd] [-t timeout] [-a aname] [-p prompt] [-n nchars] [-d delim] [name …] -t timeout: cause read to time out and return failure if a complete line of input is not read within timeout seconds. This … Read more