Re: Ulozeni vstupu a odeslani dal


To czdebian-l zavinac debian bod cz
From Matej Cepl <ceplm zavinac seznam bod cz>
Date Wed, 31 May 2006 20:32:39 -0400
Organization Northeastern University, Boston, MA
User-agent KNode/0.10.2

Kepi wrote:

> priloha bohuzel nedorazila...

#!/bin/sh
# $Id: frwd-attach.sh,v 1.2 2005-12-20 00:56:15 matej Exp $
#set -x

TO="$1"
CC="$2"
BCC="$3"
BODY="${4:-Forwarded message}"

tempfile=$(mktemp /tmp/$(basename $0)XXXXXX).eml
# copy message to temporary file
cat >${tempfile}

SUBJECT="FWD: $(grep '^Subject: ' $tempfile | head -1 |
sed -e 's/^Subject: //')"

echo "$BODY" | nail -s "$SUBJECT" -a "$tempfile" $TO
rm -f $tempfile

Takhle je to lepší?

Matěj

-- 
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
http://www.ceplovi.cz/matej/blog/, Jabber: ceplma zavinac jabber bod cz
23 Marion St. #3, (617) 876-1259, ICQ 132822213
 
"Anything essential is invisible to the eyes", the little prince
repeated, in order to remember.
"It's the time you spent on your rose that makes your rose so
important."
"It's the time I spent on my rose ...," the little prince
repeated, in order to remember.
"Pepople have forgotten this truth." the fox said. "But you
mustn't forget it.  You become responsible forever for what
you've tamed. You're responsible for your rose..."
"I'm responsible for my rose...," the little prince repeated, in
order to remember.
    -- Antoine de Saint-Exupéry: The Little Prince



Partial thread listing: