![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mailx commannd - Mail and Attachment in same mail | sharif | UNIX for Advanced & Expert Users | 6 | 03-19-2008 04:25 PM |
| mail with attachment | param786 | Shell Programming and Scripting | 1 | 07-15-2007 11:20 AM |
| Sending attachment thru a mail | Rohini Vijay | UNIX for Dummies Questions & Answers | 1 | 05-12-2006 01:13 PM |
| mail attachment | sushrut | UNIX for Dummies Questions & Answers | 3 | 08-28-2001 02:14 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How To Add Attachment to Mail
I have a shell script that executes and sends out an email. Currently I cat out a report into the body of the email.
mailx -s "My Report: ${ORACLE_SID} ($FILEDATE)" \ myemail@us.com < ${LOG_DIR}/${ORACLE_SID}_audit.log Is there a way to just attach the report to the email instead? I want to attach ${LOG_DIR}/${ORACLE_SID}_audit.log instead of cat into the body of the email. |
|
||||
|
ooopsss...sorry matrix..dint saw ur reply:-)...
Quote:
... |
|
||||
|
uuencode for attchments..
u can use uuencode utility to attch a file
command: cat mail_contant.txt ; uuencode ${LOG_DIR}/${ORACLE_SID}_audit.log ${LOG_DIR}/${ORACLE_SID}_audit.log | mailx -s mailx -s "My Report: ${ORACLE_SID} ($FILEDATE)" myemail@us.com dont get confused due to writing the input file name twice...its like "encode input file name outputfilename" input file =${LOG_DIR}/${ORACLE_SID}_audit.log output=${LOG_DIR}/${ORACLE_SID}_audit.log (here both file names are same...but u can give a different file name to the encoded file) |
![]() |
| Bookmarks |
| Tags |
| mailx, mailx attachment |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|