Command line – Let it snow, Let it snow, Let it snow

Do you want to make your bash terminal snow? Here is a fun little way to do that using awk, I can’t take any credit for this one, a friend of mine got it from a friend, and so on, so give it a try!

This should be safe to copy and paste right into your bash cli and hit enter (takes a few seconds for it to start snowing)

clear; \
while :; \
do \
echo $LINES $COLUMNS $(($RANDOM%$COLUMNS)); \
sleep 0.03; \
done | \
awk '{ \
         a[$3]=0; \
         for(x in a) {o=a[x]; \
                      a[x]=a[x]+1; \
                      printf "\033[%s;%sH ",o,x; \
                      printf "\033[%s;%sH*\033[0;0H",a[x],x; \
                     } \
     }' 

Which should give you something like this, but animated!

                                             *
                                 *
                      *
                                                                           *
                                                                                                             *
                                                           *
                                           *
                                                                                                                            *
                                                                                          *
      *
                      *                                                                                           *
                                                                            *
                                                                                                                     *
                                                                             *
                                                                                              *
                                                                                *
               *
                                                               *
*                                                                   *
**** *   * ******     **   * ** *  *   ***  ** **     ** **  ** ** *   * *****  * *** ******* *    *** *  * ** * *  *** *     **

Merry Xmas!

You may also like...

  • http://www.xdfgxhc.com edrtdrtd

    do you have any other “cool” command lines beside this? thank you