Fun with Unix: Cowsay
Another in the “Fun with Unix” series (see the one other post so far on mesg), today’s episode covers a little trick that goes alongside messages.
Here it is:
_______ < hello > ------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||
The code to output the above is:
echo "hello" | cowsay
You can tell cowsay to use a different picture, how about this one:
echo “hello” | cowsay -f elephant _______ < hello > ———- \ /\ ___ /\ \ // \/ \/ \\ (( O O )) \\ / \ // \/ | | \/ | | | | | | | | | o | | | | | |m| |m|
Or even:
echo “hello” | cowsay -f daemon _______
< hello > ———- \ , , \ /( )` \ \ \___ / | /- _ `-/ ‘ (/\/ \ \ /\ / / | ` \ O O ) / | `-^—’`< ‘ (_.) _ ) / `.___/` / `——-’ /
<——. __ / __ \
<——|====O)))==) \) /====
<——’ `—’ `.__,’ \ | | \ / ______( (_ / \______ ,’ ,——-’ | \ `—{__________) \/
My files are in /usr/share/cowsay/cows so have a look what you have.
Of course you can use these in conjunction with write that I mentioned last time, by using something like:
echo "hello there" | cowsay -f hellokitty | write kevin
Enjoy :)