Advertisement
pintcat

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

Dec 25th, 2022 (edited)
1,605
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. MAX=100
  4.  
  5. [ -z "${1##*[!0-9]*}" ] || MAX=$1
  6. while [ $((VAL=$VAL+1)) -le $MAX ]; do
  7.     printf "\r%$((${#MAX}+1))s" $VAL"%"
  8.     sleep 0.02s
  9. done
  10. echo
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement