>-----Original Message-----
>From: Erwin Dwight Ruiz [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, September 17, 2003 3:29 PM
>To: Philippine Linux Users Group Mailing List
>Subject: Re: [plug] mailing file as attachment
>

thanks for the reply.

>change the line ux2dos $1 | uuencode $1.txt >> temp.txt
>to ux2dos $1 >> temp.txt
>
>i think uuencode $1.txt is just for the encoding of characters.

the file will end up in the body of the mail. the uuencode line
makes it possible for the file to be attached to the mail.

>On Thu, 2003-09-18 at 15:01, Tapang, Roderick (GXS) wrote:
>> hi gurus,
>> 
>> i have a small ksh script that sends a file as an attachment.
>> how do i eliminate the portion where it writes a file on the
>> disk  just to add the .txt extension?
>> 
>> here is the current:
>> #
>> #####
>> if [ $# != 2 ] || [ ! -a $1 ]
>> then
>>         print "$USAGE"
>>         exit 1
>> fi
>> 
>> ux2dos $1 | uuencode $1.txt >> temp.txt
>> mail $2 < temp.txt
>> #####
>> 
>> ex:
>> file on disk:
>> 
>> cache/file1
>> 
>> target add -  [EMAIL PROTECTED]:
>> 
>> send.sh cache/file1 [EMAIL PROTECTED]
>> 
>> (will send file1.txt as an attachment)
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to