Share to: share facebook share twitter share wa share telegram print page

 

Cowsay

cowsay
Original author(s)Tony Monroe
Initial release1999
Stable release
3.8.4[1] Edit this on Wikidata / 30 November 2024; 2 months ago (30 November 2024)
Repository
Written inPerl
Operating systemCross-platform
Available inEnglish
LicenseArtistic License / GNU General Public License
WebsiteOfficial website Edit this at Wikidata

cowsay is a program that generates ASCII art pictures of a cow with a message.[2] It can also generate pictures using pre-made images of other animals, such as Tux the Penguin, the Linux mascot. It is written in Perl. There is also a related program called cowthink, with cows with thought bubbles rather than speech bubbles. .cow files for cowsay exist which are able to produce different variants of cows, with different kinds of eyes, and so forth.[3] 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.[4]

Example

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

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

Using the parameter -f followed by tux, one can replace the cow with other beings, such as Tux, the Linux mascot:

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

Using the parameter -l shows all available cow files:

[user@hostname ~]$ cowsay -l
Cow files in /usr/share/cowsay/cows:
apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default
dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala
mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep
skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey
turtle tux unipony unipony-smaller vader vader-koala www

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, plus a descending U to represent an extruded tongue, also used on Linux kernel oops.
-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.

References

  1. ^ "Release 3.8.4". 30 November 2024. Retrieved 29 December 2024.
  2. ^ Orr, Mike (June 2001). "cowsay--ASCII Art for Your Screen". Linux Gazette. Archived from the original on 2012-03-19. Retrieved 2012-04-24.
  3. ^ Newborough, Philip (2007-10-05). "A Virtual Richard Stallman for Cowsay Hack". Archived from the original on 2011-07-25.
  4. ^ Beshenov, Alexey (2007-10-28). "cowsay: a configurable talking and thinking cow". Debian Package of the Day. Archived from the original on 2007-10-30. Retrieved 2022-01-31.
  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.
Kembali kehalaman sebelumnya


Index: pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve 
Prefix: a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9