I speak here {^_^}

Cowsay: A loopy day @ @

July 31, 2019

Umm, I don't know if you understand anything out of the title or not ( or you already might be knowing as well). But, it came to my rescue today and this is the only satisfying thing that has happened to me, for the day. 😛


Ok, before revealing what is this (for the one's like me 😆), lemme actually compile up the progress of my day.

  1. The title is an apt one because definitely it was a loopy day. I spent my whole day looping around implementing some basic level Ansible in the docker containerised VM setup (that I created yesterday). And I'm still in the loop. So, maybe I will write more about it later someday.
  2. I (actually destroyed) experimented with many VM partitions, labels and file systems. Explored some of the important command line tools (fdisk, parted, mkfs for now) for managing hard disk partitions. [That's my progress in Ops School Curriculum.]
  3. The loop actually turned to be very fruitful as well. I'm understanding the terminologies of docker in their right way now. Besides, have literally realised the importance of writing custom docker images. So, now the next step will be to write more efficient Dockerfiles, or otherwise, I will be left in just downloading even the basic packages and tools, for the whole day (and that I absolutely don't want).
  4. Tmux proved to be instrumental. I am loving the way how beautifully it allows me to work on multiple components at the same time. And yes, it has certain other interesting applications as well. I am looking forward to using it for pair-programming (atleast, will give a try forsure).
  5. Also learnt how to beautify my email replies. Thanks to a *Pro-reviewer* :) .
  6. And the most important part of the day. I finally have a thing to waste my time with, when I have something important to do 😂, THE  cowsay.

🎉🎉 Now revealing the most awaited part of the post. 🎉🎉

cowsay is a classic program. It does not really do anything useful. It just provides amusment. Give cowsay a line of text and it will generate the image of a talking cows in ASCII art saying that line.

Jason Rigden

Ok :D . So, Cowsay is nothing but an unix command which creates ASCII arts echoing sentences that you pass along with it.

// command to install cowsay.
$ sudo apt-get install cowsay

// Usage:- cowsay <some_text>
$  cowsay Finally revealed what is cowsay!

And you will see an ASCII art like this as your output:

< Finally revealed what is cowsay! >
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

There are certian other flags to draw cowsay art in different modes. If you also want to entertain yourself, read about them here. I am definitely gonna play with cowsay characters while running Ansible Playbooks.

And if you want to check for all the available cowsay characters, run the following script in your terminal (pipe it into less).

$ for f in /usr/share/cowsay/cows/*; do cowsay -f "${f:23:-4}" "${f:23:-4}"; done | less

I was trying to add a vertical scrollbar here for showing the output of the above command, but it's not happening right now. So, will update later if I manage to find out a way for this.

You may want to check this post as well for more such interesting linux commands. (But make sure, you try them in an isolated environment. These might have some malicious code inside.)

That's all for this post. o/