I am a newbie to unix shell scripting. Can some one say what is wrong with the below code?
#!bin/sh
echo "Sleep and while do try"
i = "10"
while [ $i -gt 0 ]
do
echo "$i seconds left"
i= $ (expr $i -1)
sleep 1
done
It gives me the following error message:
Sleep and while do try
a.sh: line 3: i: command not found
a.sh: line 7: syntax error near unexpected token `('
a.sh: line 7: ` i= $ (expr $i -1)'