Skip to content

Instantly share code, notes, and snippets.

@chrisshroba
Created July 22, 2015 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisshroba/d47976b277ba1670d5b0 to your computer and use it in GitHub Desktop.
Save chrisshroba/d47976b277ba1670d5b0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
COLUMNS=$(tput cols)
for i in $(seq 1 $((COLUMNS - 2)))
do
echo -ne "\033[2K\r"
echo -n "["
yes = | head -n $i | tr -d "\n"
if [ $((COLUMNS - 2 - i)) != 0 ]
then
yes " " | head -n $((COLUMNS - 2 - i)) | tr -d "\n"
fi
echo -n "]"
sleep .03
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment