I am writing a installation script and would like to display the status of the script as it progresses.
example:
var1=\"pending\"
var2=\"pending\"
va
You can use the carriage return to change text on a single status line.
n=0
while true; do
echo -n -e "n: $n\r"
sleep 1
n=$((n+1))
done
If you can put all your counters on one line
n=0
m=100
while true; do
echo -n -e "n: $n m: $m\r"
sleep 1
n=$((n+1))
m=$((m-1))
done
This technique doesn't seem to scale to multiple lines, though it does have the benefit over tput that it works on dumb terminals (like Emacs shell).