return value of read

beast22 at arcor.de beast22 at arcor.de
Wed Nov 5 15:46:33 UTC 2008


Hi,

given the read command 

read -t10 dummy

I'd like to distinguish between a timeout (no key hit) and a simple >return<.
In other shells I do this usually by testing the return value of read: 
It's 0 when a button press occurred and 1 on timeout.

Any ideas how I can handle this here?

BTW: I'm using 1.7.4 and this might be outdated - In that case, to which (minimal!) version I'll have to upgrade?

Regards,
Roger



More information about the busybox mailing list