On Sat, 2003-02-01 at 20:26, Todd Slater wrote:
> On 01 Feb 2003 16:47:02 -0400
> Adolfo Bello <[EMAIL PROTECTED]> wrote:
> 
> > On Sat, 2003-02-01 at 16:36, Stephen Kuhn wrote:
> > 
> > > There have been some issues with the Evo generated sigs - so the
> > > resolution to that is to either dig deeper into how it works, or
> > > create your own script OUTSIDE of Evo to do it. I tried mucking around
> > > with it over and over again and even employed some of the "HTML
> > > tactics" to get it working, but alas, I'm sticking with my hand
> > > generated one...
> > I just finished with this one.
> > 
> > My final script is:
> > 
> > date -R > /tmp/fecha.txt
> > uptime > /tmp/corriendo.txt
> > /usr/games/fortune > /tmp/dicho.txt
> > echo "--<br>"
> > cat ~/scripts/firma.txt /tmp/fecha.txt /tmp/corriendo.txt /tmp/dicho.txt
> > | sed -e "s/ /\&nbsp;/g" | sed -e "s/$/<br>/g"
> > 
> > As you can see is working just fine.
> > 
> > Goshhhhhh!!!!
> 
> Of course there a zillion ways to do this, but writing all that output to
> other files is not necessary. For example,
> 
> echo "firma o lo que quieras"
> date -R
> uptime
> fortune
> 
> does the same thing. The echo "--<br>" I think should be echo "-- " (two
> hyphens and a space) and may not even be necessary depending on your MUA;
> Sylpheed uses that as a delimiter by default, I think Mozilla too, don't
> know Evolution.
> 
> Todd
You're partially right.

Evolution takes as input some sort of HTML format, so you have to
replace spaces used for formatting by "&nbsp;" (no quotes). This is the
reason for
        sed -e "s/ /\&nbsp;/g"

Additionally, you have to make your own HTML end-of-line, so you need:
        sed -e "s/$/<br>/g"

Finally, Evolution doesn't insert the "--" line to signal the beginning
for script generated signatures. That's the reason for
        echo "--<br>"

This way, using your script, I will need to use the two sed pipes in
every line. Nothing wrong with that, but I prefer using them only once
even when my script has to write three times to disk.

--
    __ 
   / \\   @       __     __    @   Adolfo Bello / [EMAIL PROTECTED]
  /  //  // /\   / \\   // \  //   Bello Ingenieria S.A, ICQ: 65910258
 /  \\  // / \\ /  //  //  / //    cel: +58 416 609-6213
/___// // / <_/ \__\\ //__/ //     fax: +58 212 952-6797
    www.bisapi.com   //            pager: www.tun-tun.com (# 609-6213)

Sat, 01 Feb 2003 20:51:33 -0400
  8:51pm  up 13:02,  3 users,  load average: 1.49, 1.62, 1.32
And tomorrow will be like today, only more so.
-- Isaiah 56:12, New Standard Version


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to