Play with Linux - 6 - Command : cowsay

6 . Command: Cowsay

An ASCII cow in terminal that will say what ever you want.

Install Cowsay

root@tecmint:~# apt-get install cowsay   (for Debian based OS)
root@tecmint:~# yum install cowsay  (for Red Hat based OS)
Output
root@tecmint:~# cowsay I Love nix 

 ____________
< I Love nix >
 ------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
How about pipelineing ‘fortune command‘, described above with cowsay?
root@tecmint:~# fortune | cowsay 

 _________________________________________
/ Q: How many Oregonians does it take to  \
| screw in a light bulb? A: Three. One to |
| screw in the light bulb and two to fend |
| off all those                           |
|                                         |
| Californians trying to share the        |
\ experience.                             /
 -----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
Note: ‘|‘ is called pipeline instruction and it is used where the output of one command needs to be the input of another command. In the above example the output of ‘fortune‘ command acts as an input of ‘cowsay‘ command. This pipeline instruction is frequently used in scripting and programming.
xcowsay is a graphical program which response similar to cowsay but in a graphical manner, hence it is X of cowsay.
apt-get install xcowsay
yum install xcowsay
Output
root@tecmint:~# xcowsay I Love nix
install xcowsay
xcowsay command
cowthink is another command just run “cowthink Linux is sooo funny” and see the difference in output of cowsay and cowthink.
apt-get insatll cowthink
yum install cowthink
Output
root@tecmint:~# cowthink ....Linux is sooo funny
 _________________________
( ....Linux is sooo funny )
 -------------------------
        o   ^__^
         o  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Comments

Popular Posts