Created
July 22, 2015 19:13
-
-
Save chrisshroba/d47976b277ba1670d5b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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