APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Some fun tools in the UNIX ecosystem

by Girish Venkatachalam

Girish Venkatachalam is a UNIX hacker with more than a decade of networking and crypto programming experience. His hobbies include yoga,cycling, cooking and he runs his own business. Details here:

http://gayatri-hitech.com

http://spam-cheetah.com

I can't think of a better way to start this article than this.

Long ago, sometime in 2001 I came to know about a certain command line tool which I had not heard. I expressed a lot of surprise and regret at that to which my friend said simply.



In the ocean there are innumerable creatures. We cannot know about every single organism.

Later I lost touch with that friend but I remember his words. It only gets worse with a new exciting tool showing up on sourceforge every other day. But I normally wait for OS vendors to pull the packages into their tree.

We are going to take a brief look at a few of them. They are fun tools and these tools have gone a long way in improving the sex appeal of UNIX. And geeks like us.

After all hackers are not boring people with no interest in women and with women having nothing of interest in them. Hackers love fun too except that their idea of fun is bit different. Let us take a look at the ASCII art generation program figlet first.

figlet(1) generates ASCII art text by taking input from the command line and spits out a big ASCII rendering to stdout. You can choose from a big list of fonts and styles. Like all UNIX tools this one comes with a lot of options. You can get creative and use tr(1) or sed(1) and further beautify the output. Here is a sample.


                                                                          
  *                              *                                        
**          *            *     **                                         
**         ***          **     **                                         
**          *           **     **                                         
**                    ******** **                  ***  ****              
**  ***   ***        ********  **  ***      ***     **** **** *    ***    
** * ***   ***          **     ** * ***    * ***     **   ****    * ***   
***   ***   **          **     ***   ***  *   ***    **          *   ***  
**     **   **          **     **     ** **    ***   **         **    *** 
**     **   **          **     **     ** ********    **         ********  
**     **   **          **     **     ** *******     **         *******   
**     **   **          **     **     ** **          **         **        
**     **   **          **     **     ** ****    *   ***        ****    * 
**     **   *** *        **    **     **  *******     ***        *******  
 **    **    ***                **    **   *****                  *****   
       *                              *                                   
      *                              *                                    
     *                              *                                     
    *                              *                                      
                                                                          
$ figlet -fcaligraphy hi there
 

gave this output. The biggest problem with ASCII art is the silly line wrapping done by e-mail clients and several several programs. So you have to be really careful! I have warned you. It will completely mangle the output.

The fortune(1) program must doubtless be familiar to your ears still it is worth mentioning. You can type it on the console without any arguments and it will print a random cookie. Some witty saying, some thought provoking quote or some such thing. It is one of the ways in which I got around my boredom.

I was particularly impressed with the randtype utility. It is quite amazing since it is just one C file but it produces a very spooky looking output that would instantly remind one of UNIX. In fact I loved the utility so much that I went ahead and ported it to OpenBSD, my OS of choice.

randtype(1) is not only a fun tool but also useful since it simulates a user sitting and typing on a console/terminal. Just try this and you will know what I mean.

$ randtype /etc/passwd
 

Shows the power of C programming!

I have always felt that the power of nCurses programming is best tapped by Perl programming rather than C. Curses programming is so messy with C. The Term::Animation CPAN module and the Curses::UI module will illustrate that fact.

Still ASCII art and console animations look weird to people. Even mplayer can play video on the console using libcaca or something. Seeing a motion picture with ASCII is odd but hackers do what they want. Not what others want.

I am not finished yet. You should perhaps now go to sourceforge and search for fun. No pun intended.

References and further reading

  1. randtype type letters slowly and randomly
  2. figlet ASCII art generation tool
  3. Curses::UI perl module from CPAN for nCurses programming
  4. Perl Term::Animation CPAN module



Got something to add? Send me email.



2 comments



Increase ad revenue 50-250% with Ezoic


More Articles by © Girish Venkatachalam







Wed Aug 19 16:52:10 2009: 6771   TonyLawrence

gravatar
hackers are not boring people with no interest in women and with women having nothing of interest in them.

Some hackers ARE women. Also, some hackers are homosexual.

For all we know, some may be little green men who reproduce by budding.







Wed Aug 19 22:21:14 2009: 6773   CorkyAgain

gravatar
Some hackers are even pedantically politically correct. ;-)

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





If you ask "Should we be in space?" you ask a nonsense question. We are in space. We will be in space. (Frank Herbert)

The man who receives five thousand dollars a year wants six thousand dollars a year, and the man who owns eight or nine hundred thousand dollars will want a hundred thousand dollars more to make it a million, while the man who has his millions will want everything he can lay his hands on and then raise his voice against the poor devil who wants ten cents more a day. (Samuel Gompers)










This post tagged: