Skip to content

Instantly share code, notes, and snippets.

@hhutch
Forked from anonymous/bash-throbber.sh
Last active December 14, 2015 19:38
Show Gist options
  • Save hhutch/5137658 to your computer and use it in GitHub Desktop.
Save hhutch/5137658 to your computer and use it in GitHub Desktop.
Throbber using UTF8 clock
#!/usr/bin/env bash
C="0" # count
while [ $C -lt 30 ]
do
case "$(($C % 11))" in
0) char="\xF0\x9F\x95\x90"
;;
1) char="\xF0\x9F\x95\x91"
;;
2) char="\xF0\x9F\x95\x92"
;;
3) char="\xF0\x9F\x95\x93"
;;
4) char="\xF0\x9F\x95\x94"
;;
5) char="\xF0\x9F\x95\x95"
;;
6) char="\xF0\x9F\x95\x96"
;;
7) char="\xF0\x9F\x95\x97"
;;
8) char="\xF0\x9F\x95\x98"
;;
9) char="\xF0\x9F\x95\x99"
;;
10) char="\xF0\x9F\x95\x9A"
;;
11) char="\xF0\x9F\x95\x9B"
;;
esac
sleep .5
echo -ne $char "\r"
C=$[$C+1]
done
echo -e 'done\r'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment