- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sendmail question
Operating System - HP-UX
1753808
Members
7707
Online
108805
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
тАО09-21-2010 01:28 PM
тАО09-21-2010 01:28 PM
sendmail question
I have a list of emails and first and last names in a file currently. I want to put just the email addresses into an perl or bash array then loop through those email addresses. I have no clue how to start this. Could someone just get me started please?
Ross Hanson
- Tags:
- sendmail
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2010 01:52 PM
тАО09-21-2010 01:52 PM
Re: sendmail question
Use of sendmail and bash implies Unix (wrong forum for that, this is the VMS forum and not the hot-bed of bash over here) and (if you have a Unix shell around) then a grep and maybe an awk might be the fastest way to extract the email addresses. Pipe the results of that script off to a file and Bob's your uncle.
Google finds the following for reading a file into an array
http://www.perlmonks.org/?node_id=19756
http://www.pageresource.com/cgirec/ptut14.htm
(and various other topics)
Google finds various Perl regexp processing libraries around and I'd be floored if there wasn't a Perl module or three or five that could be used here.
Here are some topics..
http://search.cpan.org/~dcoppit/Mail-Mbox-MessageParser-1.5002/lib/Mail/Mbox/MessageParser/Perl.pm
http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
http://perl.goeszen.com/simple-mbox-email-reader-in-perl.html
And I get (many) more hits for Google for:
http://www.google.com/search?hl=en&q=perl+email+address++mbox
Guessing that your mail is in mbox format with that Google query; that's common with various Unix platforms.
Stack Overflow and other sites are also good spots if you're just learning Perl.
And (of course) there are various books on Perl around.
http://oreilly.com/perl/index.html
Google being your BFF 4EVAH!!! FTW LOL.
Ok, that was too much... Sorry. I'm back now. :-)
Google finds the following for reading a file into an array
http://www.perlmonks.org/?node_id=19756
http://www.pageresource.com/cgirec/ptut14.htm
(and various other topics)
Google finds various Perl regexp processing libraries around and I'd be floored if there wasn't a Perl module or three or five that could be used here.
Here are some topics..
http://search.cpan.org/~dcoppit/Mail-Mbox-MessageParser-1.5002/lib/Mail/Mbox/MessageParser/Perl.pm
http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
http://perl.goeszen.com/simple-mbox-email-reader-in-perl.html
And I get (many) more hits for Google for:
http://www.google.com/search?hl=en&q=perl+email+address++mbox
Guessing that your mail is in mbox format with that Google query; that's common with various Unix platforms.
Stack Overflow and other sites are also good spots if you're just learning Perl.
And (of course) there are various books on Perl around.
http://oreilly.com/perl/index.html
Google being your BFF 4EVAH!!! FTW LOL.
Ok, that was too much... Sorry. I'm back now. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2010 02:20 PM
тАО09-21-2010 02:20 PM
Re: sendmail question
Sorry, I just saw the "scripting" title and away I went
Thanks for the links I will be busy reading
Thanks for the links I will be busy reading
Ross Hanson
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