Please I want to build a program in scripting that will start a timer from 60 seconds and decrement every second.There should be an input where the user should be able to enter the secret password to dis-activate the timer-bomb.If the user fails to enter the correct password 3 times or the timer reaches 0 without any entries,a message should be displayed as Bomb Exploded else a message should be displayed as Bomb Defused.Beneath is the code i tried but its not working as i wish,so please help me if necessary.
#!/bin/bash
read -t 10 -p "Code : " code
for (( i=1 ; i<=3 ; i++ )); do echo $i;
if [ "$code" == "boom" ];
then
echo "Bomb Disactivated"
else
echo "Bomb Exploded"
fi