How to print new data on the same line?

You probably need to look at what echo -ne '\r' does.

Here is an example:

echo -ne 'Downloading 1%\r'
sleep 1

echo -ne 'Downloading 100%\r'
sleep 1

echo -ne '\n'