please read my sample script for move files
script will ask user to start movement(read command) if he does't then it sholud clear the screen and run script in while
if i do not give any input for 5 sconds then it sholud clear the script and as on
while true
do
if test [ "$yes_no" = 'Y' -o "$yes_no" = 'y' -o "$yes_no" = 'N' -o "$yes_no" = 'n' ]
then
if test $yes_no = Y -o $yes_no = y
then
echo movement started
fi
if test $yes_no = N -o $yes_no = n
then
echo movement stopped
fi
fi
echo movement is not running
echo " DO you want to continue for movement [ Y/y or N/n ]: \c "
read yes_no
echo $yes_no
sleep 5
clear
done
The shell that you are using (e.g., bash, ksh, zsh) may have an option for the read built-in that allows you to set a timing requirement. What does your man page say? ... cheers, drl
im using this code in script. whenever i press ctrl C during script execution stty setting will change and i have to logout the seesion. please give any aternative to overcome this.
If i want to increase sleep time from 5 seconds to 180 seconds then what would be the code