How to attach file to EMAIL MESSAGE within shell script(Korn shell)

How to attach file to EMAIL MESSAGE within shell script(Korn shell)

Post by ilotsv » Tue, 16 Nov 1999 04:00:00



I need send file as attachment within Korn shell script. I know how to
send file contents in message body i.e
 elm -sSubject Address < FILENAME
How this file can be sent as attachment?
Thanks for help
I Lotsvin
May be I can help You somehow also?

 
 
 

How to attach file to EMAIL MESSAGE within shell script(Korn shell)

Post by Heiner Steve » Wed, 01 Dec 1999 04:00:00



> I need send file as attachment within Korn shell script. I know how to
> send file contents in message body i.e
>  elm -sSubject Address < FILENAME
> How this file can be sent as attachment?

Some techniques are described in the article "Sending files as mail attachments"
at the SHELLdorado:

        http://www.oase-shareware.org/shell/goodcoding/mailattachments.html

Heiner
--
 ___ _                          

\__ \  _/ -_) V / -_) ' \    UNIX Shell Script Programmers: visit
|___/\__\___|\_/\___|_||_|   http://www.oase-shareware.org/shell/

 
 
 

1. Korn/Perl Shell Script to Find Updated Files and E-mail?

I'm trying to write a korn, or perl, script, that when kicked off by a cron
job, will traverse/check a directory for updated files (the files always
have the same name in the same directory) and then, if the given file(s)
timestamp(s) (?) have been updated, the script will e-mail them to a user.
The files that I want in the directory are updated every hour.  I've been
working on this for a couple of weeks and still haven't gotten the end
result I need.  Of course, I'm new at scripting so I'm on a steep learning
curve.

I tried running a script using "diff" to find the files whose timestamps
have changed, but I seem to have to have two directories, one to store the
files as they were the last time the script ran, and the other "real"
directory with all of the "real" files with the current timestamps so they
have something to compare to.  Someone said that maybe you can "touch" the
files.  I've figured out what they were refering to with the "touch" command
(to update the timestamp), but I'm not exactly sure how I can fit that in to
accomplish my task.

I tried using Perl, but again I'm learning Perl and unix shell scripting so
I'm trying to learn both and accomplish a task at the same time.  I've seen
that scripting is awesome.  I just have to get the basics down.  This stuff
is great!

Any ideas would be greatly appreciated.

Thanks in advance,
Jay

2. anybody from thane or mumbai, please help!!!!

3. Convert Bash shell script to Korn shell script

4. XFree86 3.1.1 with Mach 64 and Slackware questions.

5. shell script within shell script (general question)

6. performance measuring tools

7. Detecting video config within a Korn shell script

8. Q: Making shared library

9. best korn shell resources and is there a korn shell faq

10. c-shell script won't run from korn-shell / SETUID

11. Newbie help with Shell scripts (using Korn shell)

12. unix shell commands within ftp shell script

13. How to interact with a shell within a shell script