1# test read with a timeout of 0 -- input polling
2# sleep with fractional seconds argument is not universal
3echo abcde | { sleep 0.25 2>/dev/null ; read -t 0; }
4echo $?
5
6read -t 0 < $0
7echo $?
8
9read -t 0
10echo $?
11