Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

cowsay

From Wikipedia, the free encyclopedia
Program that generates ASCII pictures of a cow with a message
cowsay
Original authorTony Monroe
Initial release1999
Stable release
3.8.4[1] Edit this on Wikidata / 30 November 2024; 14 months ago (30 November 2024)
Written inPerl
Operating systemCross-platform
Available inEnglish
LicenseArtistic License /GNU General Public License
WebsiteOfficial websiteEdit this at Wikidata
Repository

cowsay is a program that generatesASCII art pictures of a cow with a message.[2] It can also generate pictures using pre-made images of other animals, such asTux the Penguin, the Linuxmascot. It is written inPerl. There is also a related program calledcowthink, with cows with thought bubbles rather thanspeech 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 onIRC, desktop screenshots, and insoftware documentation. It is more or less a joke withinhacker culture, but has been around long enough that its use is rather widespread. In 2007, it was highlighted as aDebian package of the day.[4]

Example

[edit]

The Unix commandfortune can also bepiped into thecowsay command:

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

Using the parameter-f followed bytux, one can replace the cow with other beings, such asTux, the Linux mascot:

[user@hostname ~]$fortune|cowsay-ftux _________________________________________/ 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-lCow files in /usr/share/cowsay/cows:apt bud-frogs bunny calvin cheese cock cower daemon default dragondragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep foxghostbusters gnu hellokitty kangaroo kiss koala kosh luke-koalamech-and-cow milk moofasa moose pony pony-smaller ren sheep skeletonsnowman stegosaurus stimpy suse three-eyes turkey turtle tux uniponyunipony-smaller vader vader-koala www

Parameters

[edit]
OptionPurpose
-nDisablesword wrap, allowing the cow to speakFIGlet or to display other embeddedASCII art. Width in columns becomes that of the longest line, ignoring any value of-W. Only works with text from stdin.
-WSpecifies width of thespeech balloon in columns, i.e. characters in a monospace font. Default value is 40.
-bBorg mode”, uses== in place ofoo for the cow′s eyes.
-d“Dead”, usesXX, plus a descendingU to represent an extruded tongue, also used onLinux kernel oops.
-g“Greedy”, uses$$.
-p“Paranoid”, uses@@.
-s“Stoned”, uses** to representbloodshot eyes, plus a descendingU to represent an extruded tongue.
-t“Tired”, uses--.
-w“Wired”, usesOO.
-y“Youthful”, uses.. to represent smaller eyes.
-e eye_stringManually specifies the cow′s eye-type, e.g.cowsay -e ^^ (seeEastern-style emoticon).[5]
-T tongue_stringManually specifies the cow′s tongue shape, e.g.cowsay -T \(\) for a pair ofparentheses.[5]
-f cowfileSpecifies a .cow file from which to load alternative ASCII art. Accepts both absolute file-paths and those relative to theenvironment variableCOWPATH.
-lLists the names of available cow-files in theCOWPATH directory instead of displaying a quote.

References

[edit]
  1. ^"Release 3.8.4". 30 November 2024. Retrieved29 December 2024.
  2. ^Orr, Mike (June 2001)."cowsay--ASCII Art for Your Screen".Linux Gazette. Archived fromthe original on 2012-03-19. Retrieved2012-04-24.
  3. ^Newborough, Philip (2007-10-05)."A Virtual Richard Stallman for Cowsay Hack". Archived fromthe 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. Retrieved2022-01-31.
  5. ^abCharacters other than printable inC0 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

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Cowsay&oldid=1334756388"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp