- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- help converting perl script output to korn
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО11-29-2004 03:41 AM
тАО11-29-2004 03:41 AM
help converting perl script output to korn
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2004 03:46 AM
тАО11-29-2004 03:46 AM
Re: help converting perl script output to korn
http://omaha.pm.org/emails/2003/msg00083.html
http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q5.19.html
Also note that I've written perl scripts that read email listes and queue up outbound messages.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2004 03:46 AM
тАО11-29-2004 03:46 AM
Re: help converting perl script output to korn
What sort of output are you getting from your perl script? To my way of thinking, it should be some form of text output that could be just piped to mailx.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2004 03:51 AM
тАО11-29-2004 03:51 AM
Re: help converting perl script output to korn
perl.script > /tmp/perlscript.out
mailx -s "perl.script" Tracy_Force@yourdoman.com < /tmp/perlscript.out
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2004 04:00 AM
тАО11-29-2004 04:00 AM
Re: help converting perl script output to korn
Here's the loop method:
#!/usr/bin/ksh # you should use /usr/bin/sh (POSIX)
TDIR=${TMPDIR:-/var/tmp}
M1=${TDIR}/X${$}_1.txt
# capture Perl output in temp file
myperl.pl > ${M1}
USERS="mickey@disney.com bugs@warnerbros.com clark_kent@dellcomics.com"
for U in USERS
do
cat ${M1} | mailx -s "My subject" ${U}
done
rm -f ${M1}
Note: The mailx command allows multiple addresses so you could specify more than 1 BUT the total length of addresses cannot exceed 1024 characters so the loop is safer.
It would be much simpler to do this:
myperl.pl | mailx -s "My Subject" myalias
"myalias" would then handle everything for you.
- Tags:
- mailx