残缺极品 发表于 2018-8-23 07:00:39

shell 进度条

  .点号进度显示
  trap 'kill $bgPid;echo;exit' 1 2 3 15
  dots() {
  sec=$1
  while true
  do
  echo -e ".\c"
  sleep $sec
  done
  }
  dots 3 &
  bgPid=$!
  cp vmtemplate_20120514.tar.gz /opt/xen/images
  kill $bgPid>>/dev/null 2>&1

页: [1]
查看完整版本: shell 进度条