FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-25-2008, 03:08 AM
John Hubbard
 
Default cowsay help

Peter Garrett wrote:
> On Wed, 24 Sep 2008 17:11:13 -0700
> John Hubbard <ender8282@yahoo.com> wrote:
>
>
>> When using cowsay, how do I control when the cow divides my message onto
>> multiple lines? I tried
>> $ cowsay line1/
>> >line2
>> >
>> but I got:
>> ____________
>> < line1line2 >
>> ------------
>> ^__^
>> (oo)\_______
>> (__) )/
>> ||----w |
>> || ||
>>
>> How can I get the cow to say my motd when I log in via ssh?
>>
>
> printf "Hello there
I'm a cow...
" | cowsay
>
> / Hello there
> | |
> I'm a cow... /
> ---------------
> ^__^
> (oo)\_______
> (__) )/
> ||----w |
> || ||
>
> Peter
>
>
Thanks. That was perfect. Now, how do I get the the cow to say my motd?

--
-john

To be or not to be, that is the question
2b || !2b
(0b10)*(0b1100010) || !(0b10)*(0b1100010)
0b11000100 || !0b11000100
0b11000100 || 0b00111011
0b11111111
255, that is the answer.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-25-2008, 03:26 AM
Peter Garrett
 
Default cowsay help

On Wed, 24 Sep 2008 20:08:10 -0700
John Hubbard <ender8282@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
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
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:02 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org