Is there a way to do printf
formatting to strings in Python? Something like this where the count x
is rewritten every time instead of echoing to a new line.
x=0
while [[ $x -lt 10 ]]; do
x=$((x+1))
printf '%s\r'"Processing page ${x}"
sleep 1
done