On 01 Feb 2003 20:54:08 -0400
Adolfo Bello <[EMAIL PROTECTED]> wrote:

> On Sat, 2003-02-01 at 20:26, Todd Slater wrote:
> > On 01 Feb 2003 16:47:02 -0400
> > Adolfo Bello <[EMAIL PROTECTED]> wrote:
<x>
> > > 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.
> 

Ohhh, now I understand. Thanks for reminding me why I *don't* use
Evolution ;)

Your script would be perfect if you used echo "--&nbsp;<br>" instead of
echo "--<br>".

Todd

-- 
Todd Slater
Mandrake Newbie searchable archives:
http://marc.theaimsgroup.com/?l=mandrake-newbie&r=1&w=2
Got a great Mandrake-Linux tip bookmarked? Send it to me and I'll include
it in my newbie tips fortune file!

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

Reply via email to