- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sendmail Q
Operating System - HP-UX
1752646
Members
6049
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
тАО07-25-2009 05:10 AM
тАО07-25-2009 05:10 AM
sendmail Q
Hi gurus,
I have a script which takes the login details from the number of servers and output will be copied to a folder.So after execution this folder will contain atleast 7 files.My Q is how could i send these 7 files to my mail id using sendmail at a shot.
main part of script given below
ssh noor@$i /home/noor/login.sh >>/syslogs/logins/$i.$DATE
plz advise on this
regards
himacs
I have a script which takes the login details from the number of servers and output will be copied to a folder.So after execution this folder will contain atleast 7 files.My Q is how could i send these 7 files to my mail id using sendmail at a shot.
main part of script given below
ssh noor@$i /home/noor/login.sh >>/syslogs/logins/$i.$DATE
plz advise on this
regards
himacs
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2009 06:00 AM
тАО07-25-2009 06:00 AM
Re: sendmail Q
Hi:
If we can assume that the directory contains only files you want to mail, then you could do something simple like:
#!/usr/bin/sh
cd /path || exit 1
for FILE in $(ls)
do
mailx -s "Please review" himacs < ${FILE}
done
...which would send one file per mail.
Regards!
...JRF...
If we can assume that the directory contains only files you want to mail, then you could do something simple like:
#!/usr/bin/sh
cd /path || exit 1
for FILE in $(ls)
do
mailx -s "Please review" himacs < ${FILE}
done
...which would send one file per mail.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2009 06:16 AM
тАО07-25-2009 06:16 AM
Re: sendmail Q
HI James,
Thanx for the reply..
Instead of writing new script ,can we add mailx command with the below script..
ssh noor@$i /home/noor/login.sh >>/syslogs/logins/$i.$DATE
so that with single line or script, the all works be done.like executing login script,directing otput to a folder and again sending the same with mailx..
regards,
himacs
Thanx for the reply..
Instead of writing new script ,can we add mailx command with the below script..
ssh noor@$i /home/noor/login.sh >>/syslogs/logins/$i.$DATE
so that with single line or script, the all works be done.like executing login script,directing otput to a folder and again sending the same with mailx..
regards,
himacs
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