Skip to content

Instantly share code, notes, and snippets.

@SantiagoTorres
Created July 28, 2016 16:28
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 SantiagoTorres/299bddcd53b1bc9b79d116464ec31746 to your computer and use it in GitHub Desktop.
Save SantiagoTorres/299bddcd53b1bc9b79d116464ec31746 to your computer and use it in GitHub Desktop.
eatstuff
#!/bin/bash
SLEEPTIME=.1
eat=$1
length=$(echo $eat | wc -c)
clear
echo ":[$eat]"
sleep $SLEEPTIME
clear
newlength=$(echo "$length/3" | bc )
for i in $(seq $length -1 $newlength)
do
echo ":[$(echo $eat | head -c $i)]"
sleep $SLEEPTIME
clear
done
for i in $(seq $newlength $length)
do
echo ":[$(echo $eat | head -c $i)]"
sleep $SLEEPTIME
clear
done
for i in $(seq $length -1 0)
do
echo ":[$(echo $eat | head -c $i)]"
sleep $SLEEPTIME
clear
done
echo ":]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment