Skip to content

Instantly share code, notes, and snippets.

@khakimov
Created August 31, 2012 19:49
Show Gist options
  • Save khakimov/3558086 to your computer and use it in GitHub Desktop.
Save khakimov/3558086 to your computer and use it in GitHub Desktop.
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@khakimov
Copy link
Author

like this

@e-fu
Copy link

e-fu commented Apr 19, 2014

nice!

@bqbtoan
Copy link

bqbtoan commented May 29, 2014

+1

@breim
Copy link

breim commented Jun 20, 2014

+1

@jezstephens
Copy link

Cool :)

Here's a deobfuscated version for the curious: https://gist.github.com/jezstephens/c34b3b803928a22631df

@c4po187
Copy link

c4po187 commented Jul 11, 2016

Nifty 👍

@JohnathonSpies
Copy link

I love this

@davidreyburn
Copy link

Cool command! I'd like to change the characters printed to terminal, but any change I make to the string in 'letters' returns the error "awk: illegal statement at source line 1 - 5 missing ]'s". Anyone know what all I need to change for that?

@dhaiducek
Copy link

dhaiducek commented Apr 20, 2018

This is sweet. Thanks! I've created an updated version that clears columns from above and exits and clears the screen upon a key press: https://gist.github.com/dhaiducek/174cdb04a5a51f016c6ca69ece721b17
(I changed it to show only zeros and ones since I couldn't get it to change to a foreign alphabet without changing my system settings.)

@HaidarSellami
Copy link

<3

@anderskitson
Copy link

@rpranshu
Copy link

How to put custom text in this?

@nguyenmanhhien
Copy link

Nice! Thank you.

@xiaotianhu
Copy link

Really cool! Love it

@rullinoiz
Copy link

real good computer heater

@yangjiang3973
Copy link

+1

@OlaoluwaM
Copy link

That's crazy man!

@iksana98
Copy link

Love it its awesome

@coolnumber9
Copy link

Thanks, @khakimov. Just in time for #TheMatrix4 #TheMatrixResurrections .
https://www.instagram.com/p/CTCXoCbJvJ4/?utm_source=ig_web_copy_link

@WuglyakBolgoink
Copy link

WuglyakBolgoink commented Sep 20, 2021

memory killer...

better use this https://sharadchhetri.com/ubuntu-linux-get-matrix-effect-terminal/

or on macOS -> brew install cmatrix

@jaagut123
Copy link

Made fork which erases the columns when its full.
https://github.com/jaagut123/bash_matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment