#!/bin/bash bar="" count=0 clock=("|" "/" ‘-‘ ‘//‘) index=0 while [ $count -le 100 ] do printf "[%-100s] [%d] [%c]\r" "$bar" "$count" "${clock[index]}" bar=${bar}"=" ((count++)) ((index=count%4)) sleep 0.05 done printf "\n"
本文出自 “小镇青苔” 博客,请务必保留此出处http://fengbaoli.blog.51cto.com/10538178/1789997
原文:http://fengbaoli.blog.51cto.com/10538178/1789997