Skip to content

Instantly share code, notes, and snippets.

@1ace
Created May 11, 2014 02:27
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 1ace/7da2a5abbe08fd115584 to your computer and use it in GitHub Desktop.
Save 1ace/7da2a5abbe08fd115584 to your computer and use it in GitHub Desktop.
Sometimes I get bored at 4am…
#!/usr/bin/env sh
anim=('_@"' '_@-"')
trail='.'
COLUMNS=$(tput cols)
for i in $(seq 1 $COLUMNS)
do
line=""
for j in $(seq 1 $i)
do
line="$trail$line"
done
line="$line${anim[$((i%${#anim[@]}))]}"
for j in $(seq 1 $COLUMNS)
do
line="$line "
done
line=${line:0:$COLUMNS}
printf "\r%s" "$line"
sleep .25
done
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment