Anyone know a simple way of using shell commands (preferably Bourne or
Korn) to clean out any unwanted keyboard input prior to performing a
My script does:
<lot of processing>
Users tend to add garbage characters or <ENTER> prior to the read during
"<lot of processing>".
I've tried several variations such as:
- <&- (close stdin -- although I'm not quite sure what this did
nor how to open it again)
- </dev/null; read
- echo " " 0>/dev/null; read
Any suggestions? I get the feeling I'm overlooking something obvious
... it can be this hard.
Thanks in advance.