cowsay

cowsay
cowsay
Original author(s) Tony Monroe
Stable release 3.03 / May 28, 2000
Written in Perl
Operating system Cross-platform
Available in English
License Artistic License / GNU General Public License
Website http://www.nog.net/~tony/warez/cowsay.shtml

cowsay is a program which generates ASCII pictures of a cow with a message.[1] It can also generate pictures using pre-made images of other animals. There is also a related program called cowthink, with cows with thought bubbles rather than speech bubbles.

  _______________________ 
 < Typical cowsay output! >
  ----------------------- 
         \   ^__^
          \  (oo)\_______
             (__)\       )\/\
                 ||----w |
                 ||     ||

.cow files for Cowsay exist which are able to produce different variants of "cows", with different kinds of "eyes", and so forth.[2] It is sometimes used on IRC, desktop screenshots, and in software documentation. It is more or less a joke within hacker culture, but has been around long enough that its use is rather widespread. In 2007 it was highlighted as a Debian package of the day.[3]

Cowsay is written in the Perl programming language, and as such is easily adaptable to system tasks in Unix, such as telling users their home directories are full, they have new mail, et cetera. Additionally, it is quite adaptable to the Common Gateway Interface.[4]

Contents

Example

The Unix command fortune can also be piped into the cowsay command:

baldur@baldur-desktop:~$ fortune | cowsay
 ________________________________________
/ You have Egyptian flu: you're going to \
\ be a mummy.                            /
 ----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

And using the parameter -f followed by tux, one can exchange the cow with Tux, the Linux mascot:

baldur@baldur-desktop:~$ fortune | cowsay -f tux
 _________________________________________
/ You are only young once, but you can    \
\ stay immature indefinitely.             /
 -----------------------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/

Parameters

Option Purpose
-n Disables word wrap, allowing the cow to speak FIGlet or to display other embedded ASCII art. Width in columns becomes that of the longest line, ignoring any value of -W
-W Specifies width of the speech balloon in columns, i.e. characters in a monospace font. Default value is 40.
-b Borg mode”, uses == in place of oo for the cow′s eyes.
-d “Dead”, uses XX.
-g “Greedy”, uses $$.
-p “Paranoid”, uses @@.
-s “Stoned”, uses ** to represent bloodshot eyes, plus a descending U to represent an extruded tongue.
-t “Tired”, uses --.
-w “Wired”, uses OO.
-y “Youthful”, uses .. to represent smaller eyes.
-e eye_string Manually specifies the cow′s eye-type, e.g. cowsay -e ^^ (see Eastern-style emoticon).[5]
-T tongue_string Manually specifies the cow′s tongue shape, e.g. cowsay -T \(\) for a pair of parentheses.[5]
-f cowfile Specifies a .cow file from which to load alternative ASCII art. Accepts both absolute file-paths and those relative to the environment variable COWPATH.
-l Lists the names of available cow-files in the COWPATH directory instead of displaying a quote.

List all forms

On Linux/Unix you can list all the available forms of cowsay beasts using this command:

cowsay -l | grep -v "^Cow" | sed -e "s% %\n%g" | sed -e "s%\(.*\)%cowsay -f \1 Now I am a \1%" | sh | less

References

  1. ^ Linux Gazette Issue 67
  2. ^ "Richard Stallman for cowsay". http://crunchbang.org/archives/2007/10/05/a-virtual-richard-stallman-for-cowsay-hack/. 
  3. ^ "cowsay: a configurable talking and thinking cow". Debian Package of the Day. October 28, 2007. http://debaday.debian.net/?m=200710. 
  4. ^ Serverwatch Article
  5. ^ a b Characters other than printable in C0 controls and basic Latin (U+0021–U+007E) will not display properly as these parameters accept only the first two bytes of input value. Using a pre-defined cow-face will over-ride any value of -e and -T.

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Cowsay — est un programme qui crée des dessins ASCII d une vache avec un message.On peut aussi créer des dessins d autres animaux. Il y un programme lié qui s appelle cowthink et qui remplace les bulles de paroles par des bulles de pensées. < sortie… …   Wikipédia en Français

  • Cowsay — Пример использования cowsay с vrms Тип Юмор Разработчик Тони Монро (Tony Monroe) Написана на Perl Операционная система …   Википедия

  • Cowsay — Infobox Software name = cowsay caption = collapsible = author = Tony Monroe developer = released = latest release version = 3.03 latest release date = latest preview version = latest preview date = frequently updated = programming language = Perl …   Wikipedia

  • Vrms — Вывод vrms, обработанный программой cowsay Тип Администрирование, Компьютерный юмор Разработчики Bdale Garbee, Stephen Moraco, Rogério Brito …   Википедия

  • vrms — Вывод vrms, обработанный программой cowsay Тип Администрирование, Компьютерный юмор Разработчики Bdale Garbee, Stephen Moraco, Rogério Brito Написана на Perl …   Википедия

  • ASCII art — Oldskool or Amiga style Newskool style …   Wikipedia

  • Vrms — signifie Virtual Richard M. Stallman soit un Richard Stallman virtuel. vrms est écrit en Perl et est publié sous Licence GPL. Sommaire 1 Principe 2 Philosophie 3 Voir aussi 3.1 …   Wikipédia en Français

  • ASCII-графика — Стиль этой статьи неэнциклопедичен или нарушает нормы русского языка. Статью следует исправить согласно стилистическим правилам Википедии. / | / // / / / / | / / / / /| | / / / / / / / /| | / / / / / / / | / / / / / / / / |/ , / / / / / | / / / / …   Википедия

  • vrms — vrms, Virtual Richard M. Stallman (Richard Stallman virtuel), est un logiciel dont le but est d informer sur la proportion de paquets libres, ou non, d une Debian (ou de ses dérivées). vrms est écrit en Perl et est publié sous Licence GPL.… …   Wikipédia en Français

  • banner — У этого термина существуют и другие значения, см. Баннер (значения). banner (англ. banner  заголовок, транспарант)  консольная утилита в Unix подобных системах, выводящая указанный текст в виде ASCII art. Существует два варианта… …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”