Hi everyone,
I included the following function into my latest script:
So far so good and everything works fine except when you press the <Enter> key it will act like Q has been pressed and quit the script ... :-(
Any ideas why that's so and what I can do about it ?
Best Regards,
Thomas
I included the following function into my latest script:
Code:
function fkt_continue
{
echo "\033[1;36mPress any key to continue (or <Q> to quit) ...\033[m"
stty -echo
stty raw
key=$(dd bs=1 count=1 2> /dev/null) > /dev/null
stty echo
stty -raw
if [ $key = "Q" -o "q" ];
then
exit 1
fi
}
So far so good and everything works fine except when you press the <Enter> key it will act like Q has been pressed and quit the script ... :-(
Any ideas why that's so and what I can do about it ?
Best Regards,
Thomas