Skip to content

Instantly share code, notes, and snippets.

@talon
Created October 3, 2019 17:57
Show Gist options
  • Save talon/9acb567fa58d9b32ee3faa258bef541b to your computer and use it in GitHub Desktop.
Save talon/9acb567fa58d9b32ee3faa258bef541b to your computer and use it in GitHub Desktop.
#!/bin/bash
trap ctrl_c INT
ctrl_c() { tput sgr0 && tput clear && exit 0; }
while true; do
tput setab "${b:-0}"
head -c "$(tput cols)" < /dev/zero | tr '\0' " "
if [[ $b -gt 7 ]]; then b=1; else b=$((b + 1)); fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment