1 #!/bin/sh 2 # Wipe the screen with a little animation 3 lines=$(tput lines) 4 printf '\033[H' 5 for _ in $(seq "$lines"); do 6 printf '\033[K\n' 7 sleep 0.02 8 done 9 for _ in $(seq "$lines"); do 10 echo 11 done 12 printf "\033[%dA" "$lines"