When I was programming in bash I could make a counter like the following:
Code:
while [ "${WAIT_TIME}" -gt 0 ]
do
echo -ne "$WAIT_TIME...\r\a"
(( WAIT_TIME -= 1 ))
sleep 1
done
I know you can use the \r option in bash with printf but can it be used in C?