在一行的开头加上 \r#!/bin/bash for i in {1..100} do printf "\r running: %d%% !!!" $i sleep 1 done # print a new line