Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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; } }}'
Copy link

khakimov commented Aug 31, 2012

like this

Copy link

e-fu commented Apr 19, 2014


Copy link

bqbtoan commented May 29, 2014


Copy link

breim commented Jun 20, 2014


Copy link

jezstephens commented Oct 19, 2014

Cool :)

Here's a deobfuscated version for the curious:

Copy link

c4po187 commented Jul 11, 2016

Nifty 👍

Copy link

JohnathonSpies commented Feb 12, 2017

I love this

Copy link

davidreyburn commented Jul 23, 2017

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?

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:
(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.)

Copy link

HaidarSellami commented Feb 16, 2019


Copy link

anderskitson commented Feb 27, 2019

Copy link

rpranshu commented Apr 30, 2019

How to put custom text in this?

Copy link

nguyenmanhhien commented Nov 11, 2019

Nice! Thank you.

Copy link

xiaotianhu commented Dec 17, 2019

Really cool! Love it

Copy link

rullinoiz commented Apr 20, 2020

real good computer heater

Copy link

yangjiang3973 commented Sep 29, 2020


Copy link

OlaoluwaM commented Nov 15, 2020

That's crazy man!

Copy link

iksana98 commented May 16, 2021

Love it its awesome

Copy link

coolnumber9 commented Aug 26, 2021

Thanks, @khakimov. Just in time for #TheMatrix4 #TheMatrixResurrections .

Copy link

WuglyakBolgoink commented Sep 20, 2021

memory killer...

better use this

or on macOS -> brew install cmatrix

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