- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to attach the file as an attachment throug...
Operating System - HP-UX
1752416
Members
6442
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2010 04:02 AM
тАО10-11-2010 04:02 AM
How to attach the file as an attachment through automated unix script.
Hi,
I want to attach the files in directory /Test/Out whenever it is copied to backup directory i.e. when the script is schedule to run. Please find the below script for copying files to backup directory, Please help me to modify this script to send me the files as an attachment in the automated e-mail which i am getting at the schedule script run.
#!/bin/ksh
cd /Test/Out
file=$(ls *)
for x in $file
do
cp $x /Test/backup/$x
done
mailx -s"FTP File" narendra.uttekar@xxxxx.com < /tmp/log/file.log
Thanks,
Narendra
I want to attach the files in directory /Test/Out whenever it is copied to backup directory i.e. when the script is schedule to run. Please find the below script for copying files to backup directory, Please help me to modify this script to send me the files as an attachment in the automated e-mail which i am getting at the schedule script run.
#!/bin/ksh
cd /Test/Out
file=$(ls *)
for x in $file
do
cp $x /Test/backup/$x
done
mailx -s"FTP File" narendra.uttekar@xxxxx.com < /tmp/log/file.log
Thanks,
Narendra
- Tags:
- attachments
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2010 04:06 AM
тАО10-11-2010 04:06 AM
Re: How to attach the file as an attachment through automated unix script.
Try a Google search on "mail attachment +site:itrc.hp.com". That will give many, many threads on this particular topic.
Pete
Pete
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2010 07:53 AM
тАО10-11-2010 07:53 AM
Re: How to attach the file as an attachment through automated unix script.
#!/bin/ksh
cd /Test/Out
file=$(ls *)
for x in $file
do
cp $x /Test/backup/$x
done
uuecode /tmp/log/file.log file.log|mailx -s "FTP File" narendra.uttekar@xxxxx.com
cd /Test/Out
file=$(ls *)
for x in $file
do
cp $x /Test/backup/$x
done
uuecode /tmp/log/file.log file.log|mailx -s "FTP File" narendra.uttekar@xxxxx.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2010 11:03 PM
тАО10-11-2010 11:03 PM
Re: How to attach the file as an attachment through automated unix script.
Hi Tim,
Thanks for the reply...i have modified the script as below as per your suggestion...
#!/bin/ksh
cd /Test/Out
file=$(ls *)
for x in $file
do
cp $x /Test/backup/$x
done
uuencode /Test/Out/$x $x|mailx -m -s "FTP File" narendra.uttekar@xxxxx.com < /tmp/log/file.log
With this script i am able to get the message body text...But if i use uuencode /Test/Out/$x $x|mailx -m -s "FTP File" narendra.uttekar@xxxxx.com then i am able to get the attachment. But i want both message body text and attachment all together.
Thanks,
Narendra
Thanks for the reply...i have modified the script as below as per your suggestion...
#!/bin/ksh
cd /Test/Out
file=$(ls *)
for x in $file
do
cp $x /Test/backup/$x
done
uuencode /Test/Out/$x $x|mailx -m -s "FTP File" narendra.uttekar@xxxxx.com < /tmp/log/file.log
With this script i am able to get the message body text...But if i use uuencode /Test/Out/$x $x|mailx -m -s "FTP File" narendra.uttekar@xxxxx.com then i am able to get the attachment. But i want both message body text and attachment all together.
Thanks,
Narendra
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP