Poor's man Matrix script

while (true) ; do pwgen 1 ; done
This creates a matrix of letters that run forever until you hit Ctrl-C simulating "The Matrix" effect... just for fun :) You may want to try the -n and -y switch to change the "FX" LOL! e.g.: pwgen -ny 3
Sample Output
ivan@kamino ~/Desktop $ while (true) ; do pwgen 1 ; done
g b b a d b h o j y t d i a v l h w b p z k h t e b j i w n w p y z w a f j a w
r o f z u a a g h k y n c c j a p a h a e h o l k z d e j y v e b q i b u e q k
k j b p b h k k g c k y z x o i u o o p k q u p h h b g l i e j t f d w l h n g
p p b k e q z j c t t s a m e x q q y k u i q h w j o u w k s h f y y f s k s m
l o z n y f t q t i i g p p q v r k m i r w v l y s a r l q d x q s d a v n y u
k i c k t y m a u b u n g j w m k k d i h b v c i x q o d g s k x m o f c g v y
m u y a i l d h n e f v l k q u d u a k f t i v x w w u d k e u b w m h e p d h
d j j k k l n e b y e s i z j i h t t i v r v v s e s e y a p r v k e c w i t d
n l k n d g m g r d n b l q s r f g f j r i m s c k c m f w v r m e x o y w d z
p u e z v x a t y t h w t u r a r f s j l y m c j c p b y j r q m h s u h u q k
d e f j n y u p b p v i d f v v w v m x q n s n e y o u o y y u h w d l n u e e
j a w h n p u u l g p x s m e n e g b j q c n a c n u o l e p q w s k p w i t v

3
By: alemani
2011-03-30 23:52:22

These Might Interest You

  • Same as the cool matrix style command ( http://www.commandlinefu.com/commands/view/3652/matrix-style ), except replacing the printed character with randomness. The command mentioned is much faster and thus more true to the matrix. However, mine can be optimized, but I wasted ... i mean spent enough time on it already Show Sample Output


    6
    check the sample output below, the command was too long :(
    pykler · 2009-09-29 19:30:10 2

  • 5
    echo 'graph{node[shape=record];rankdir=LR;matrix[label="{1|2|3}|{4|5|6}|{7|8|9}",color=red]}' | dot -Tpng | display
    kev · 2011-12-28 04:50:09 2
  • Another wall matrix :) Show Sample Output


    0
    while $t; do for i in `seq 1 30`;do r="$[($RANDOM % 2)]";h="$[($RANDOM % 4)]";if [ $h -eq 1 ]; then v="\e[1m $r";else v="\e[2m $r";fi;v2="$v2 $v";done;echo -e $v2;v2="";done;
    jhansen · 2009-07-10 00:54:21 0
  • This is longer than others on here. The reason for this is I have combined two different matrix commands so it would work on all computers. I logged onto my server through a computer and it worked fine. I logged into my server through a mac and it looked $4!t so I have made one that works through both. Show Sample Output


    -1
    echo -e "CHECK=SAMPLE" output --command_to_long
    techie · 2013-04-03 08:46:47 1

What Others Think

In bash you can save yourself a command by using : (colon) instead of true. : (colon) is a bash-builtin that expands parameters (none in this case) and returns true. while :; do pwgen 1; done
flatcap · 376 weeks and 5 days ago
@flatcap you're absolutely right I am just to used to put explicitly '(true)', thanks for the tip ;)
alemani · 376 weeks and 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: