Skip to content

Instantly share code, notes, and snippets.

@cbanowsky
Created May 22, 2014 20:03
Show Gist options
  • Save cbanowsky/6273f6b0e87c5a1ad584 to your computer and use it in GitHub Desktop.
Save cbanowsky/6273f6b0e87c5a1ad584 to your computer and use it in GitHub Desktop.
Matrix shell script....
#!/bin/bash
echo -e "\033[2J\033[?25l"; R=`tput lines` C=`tput cols`;: $[R--] ; while true
do ( e=echo\ -e s=sleep j=$[RANDOM%C] d=$[RANDOM%R];for i in `eval $e {1..$R}`;
do c=`printf '\\\\0%o' $[RANDOM%57+33]`
$e "\033[$[i-1];${j}H\033[32m$c\033[$i;${j}H\033[37m"$c; $s 0.1;if [ $i -ge $d ]
then $e "\033[$[i-d];${j}H ";fi;done;for i in `eval $e {$[i-d]..$R}`; #[mat!rix]
do echo -e "\033[$i;${j}f ";$s 0.1;done)& sleep 0.05;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment