I am using Bash (cygwin), and I would like to implement something like a progress indicator that spans vertical lines. It replaces the console output and does not append to it. It needs to look like an animation.
So this output appears over time:
Iteration 1:
---
---
---
Iteration 2:
*--
---
---
Iteration 5:
***
*--
---
The trick is to span vertical lines.
It is easy with echo if you do not span vertical lines. I can use \b to move backwards a space and overwrite previous characters:
echo -n -e "\b"
But how do you move up a line and overwrite previous lines.
You use ANSI escape-sequence to move the cursor:
so