Skip to content

Instantly share code, notes, and snippets.

@andrezrv
Created December 19, 2013 00:42
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 andrezrv/8032409 to your computer and use it in GitHub Desktop.
Save andrezrv/8032409 to your computer and use it in GitHub Desktop.
Trigger a Matrix effect in your command line. Very unuseful, but nice and cool.
echo -e "\e[32m";
while :; do for i in {1..16};
do r="$(($RANDOM % 2))";
if [[ $(($RANDOM % 5)) == 1 ]]; then
if [[ $(($RANDOM % 4)) == 1 ]]; then
v+="\e[1m $r ";
else
v+="\e[2m $r ";
fi;
else
v+=" ";
fi;
done;
echo -e "$v";
v="";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment