Matrix Style

while true; do printf "\e[32m%X\e[0m" $((RANDOM%2)); for ((i=0; i<$((RANDOM%128)); i++)) do printf " "; done; done
Unlike other alternatives, this command only relies on bash builtins and should also work on windows platforms with the bash executable. Sparseness corresponds to the number 128 and can be adjusted. To print all possible digits instead of only 0 and 1 replace RANDOM%2 by RANDOM%10 or RANDOM%16 to add letters [A-F].
Sample Output
           0                         0              0                    0          0 
         01               0              1       1     00   0                   1      
 1                   0         0         0                 0         1                
0              0 0                       0      0                          0           
     1          1  0             1          1             1                      0     
 1        0         1                            0   0           0                  1   
 1                       0     1 

2
By: seb1245
2012-11-27 10:40:42

10 Alternatives + Submit Alt

What Others Think

Really admirable blog updates you bring for us and there are the developers who need help with syntax in coding and for them sharing information quite useful. Thank you and keep going to share such an upcoming post on https://topbritishwriters.com/ukassignmentshelp-review/ for us as well.
LucieGreenholt · 5 weeks and 2 days ago
Our prior goal is to surpass all the expectations of our client by providing outstanding customer support service, greater value and increased flexibility which in results optimize system functionality and improve operation efficiency. erp software company in india top erp vendors erp software company
delhis · 3 weeks and 1 day ago
We are best Professional SEO, Digital Marketing, Web Designing and Web Development Company in Bangalore. PPC agency in bangalore and best seo company in bangalore and smo company in bangalore
delhis · 4 days ago
We all come to work everyday to solve the most basic to the most complex visa related problems. We are passionate about providing you best suited solution to your needs. canada visa lawyer in india and canada express entry
delhis · 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: