cowsay help
Peter Garrett
peter.garrett at optusnet.com.au
Thu Sep 25 03:26:30 UTC 2008
On Wed, 24 Sep 2008 20:08:10 -0700
John Hubbard <ender8282 at yahoo.com> wrote:
> Thanks. That was perfect. Now, how do I get the the cow to say my motd?
Send the output to a file, or directly to /etc/motd. You can do this
with the following, for example:
printf "This is my multi-line \n message of the day" | cowsay | sudo tee /etc/motd
(all one line -ignore any wrap in the above)
Possibly a better way is to define the wrap with cowsay's "-W" option.
For example:
printf "This facility is monitored by the Bovine Silliness Alliance (BSA) You have been warned"\!"" \
| cowsay -W 67 | sudo tee /etc/motd
You see this output, and the output is also sent to /etc/motd by the pipe to "tee" :
/ This facility is monitored by the Bovine Silliness Alliance (BSA) \
\ You have been warned! /
-------------------------------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
*grin*
Peter
--
"INX Is Not X" Live CD based on Ubuntu 8.04 : http://inx.maincontent.net
Screenshots slideshow: http://inx.maincontent.net/album/1.png.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080925/d1e93559/attachment.sig>
More information about the ubuntu-users
mailing list