pintcat

wait.sh - Simple script which pretends to carry out a process and puts fake progress info to stdout.

Dec 25th, 2022 (edited)
1,872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.16 KB | Software | 0 0
  1. #!/bin/sh
  2.  
  3. [ -n "${1##*[!0-9]*}" ] && MAX=$1 || MAX=100
  4. while [ $((VAL=$VAL+1)) -le $MAX ]; do
  5.     printf "\r%$((${#MAX}+1))s" $VAL"%"
  6.     sleep 0.02s
  7. done
  8. echo
  9.  
Advertisement
Add Comment
Please, Sign In to add comment