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
09-25-2008, 03:26 AM
Peter Garrett
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