does anyone know how to disable interpretaion of special characters in a script ?
I would like to get a script that breaks whenever I press any key of the keyboard, for say during 5 seconds.
I have the following script.
while [ $i -ge 0 ]; do
echo -n "$i"
read -n1 -t 1 keypressed <&1
if [ ! -z "$keypressed" ]; then
let $[ i -= 1 ]
It is ok when I press alphanumeric keys, but it doesn't work for keys like "tab" key or "ctrl" key.
Any help will be very appreciated.