Of course I don't mind, don't mention it. On the contrary I'm rather flattered you used my code.
One comment I might add though on what you have now, on the 2nd nested if structure:
Code:
if (( counter>1 )); then
echo -e -n "\033[0;33m$counter"; tput sgr0
else
echo -e -n "\033[0;32m$counter"; tput sgr0
fi
Looks like you have two identical echo statements there.
I wrote this in the original code to make up for the extra digit (when I reached ten) when I used the two backspaces.
I see you took the double backspaces out, but I also see you're counting down instead of up. I guess you're not using numbers greater than 10 so it isn't a problem, but then again I haven't run your code myself so I don't really know.
But anyway, I brought this up as you may decide to remove these lines of code as unnecessary and just stick with:
Code:
echo -e -n "\033[0;33m$counter"; tput sgr0
Thanks for posting this, I enjoy shell scripting.