clear stdin example

This commit is contained in:
Kolan Sh 2011-04-30 18:03:24 +04:00
parent 0af0bf311d
commit 056ad46082
1 changed files with 15 additions and 0 deletions

15
bash/clear_stdin/clear_stdin.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
clear_stdin()
{
while read -n1 -t.1 a;do :;done
}
sleep 3
clear_stdin
echo -n "Введите a: "
read a
echo $a