In lots of Linux programs, like curl, wget, and anything with a progress meter, they have the bottom line constantly update, every certain amount of time. How do I do that in a bash script? All I can do now is just echo a new line, and that's not what I want because it builds up. I did come across something that mentioned "tput cup 0 0", but I tried it and it's kind of quirky. What's the best way?
['https://Stackoverflow.com/questions/5861428', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/689317/']
```
{
  for pc in $(seq 1 100); do
    echo -ne "$pc%\033[0K\r"
    usleep 100000
  done
  echo
}

```

The "\033[0K" will delete to the end of the line - in case your progress line gets shorter at some point, although this may not be necessary for your purposes.

The "\r" will move the cursor to the beginning of the current line

The -n on echo will prevent the cursor advancing to the next line
You can also use `tput cuu1;tput el` (or `printf '\e[A\e[K'`) to move the cursor up one line and erase the line:

```
for i in {1..100};do echo $i;sleep 1;tput cuu1;tput el;done

```