I want to write an interactive script that I am going to run from a command-line.
I want it to do things and read input keystrokes that may be present at the same time.
To do this, I believe the best way would be to setup a tight loop that alternated between testing if there are any characters on the input and going on with it's tasks at the same time.
In order to do that I would need a call (similar to the flock non-blocking flag) that would tell me if new input is present yet and return immediately if it is not.
Any ideas?
In reply to Non-blocking read by tomazos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |