When we download something or install software via Terminal, we always see a number show the progress to us.
The number is changed, but it still in the same line.
How can I do in the bash?
I'm a new basher, help!
The trick is to use \r instead of \n at the end of the line:
echo -n " 50% complete."$'\r'; sleep 1; echo "100% complete."
Use echo -n.
More informations on this other post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With