标签:ESS style shel bin and man 命令 spi shell
#!/bin/sh sleep 10 & pid=$! # Process Id of the previous running command spin=‘-\|/‘ i=0 while kill -0 $pid 2>/dev/null do i=$(( (i+1) %4 )) printf "\r[${spin:$i:1}]" sleep .1 done
#!/bin/sh j=‘‘ for ((i=0;$i<=100;i+=2)) do printf "progress:[%-50s]%d%%\r" $j $i sleep 0.1 j=#$j done echo
#!/bin/bash i=0 j=‘#‘ k=(‘|‘ ‘\‘ ‘-‘ ‘/‘) l=0 while [ $i -le 25 ] do printf "progress:[%-25s][%d%%][%c]\r" $j $(($i*4)) ${k[$l]} j+=‘#‘ let i++ let l=i%4 sleep 0.1 done printf "\n"
标签:ESS style shel bin and man 命令 spi shell
原文地址:https://www.cnblogs.com/Wolf-Dreams/p/12938675.html