Sponsored Content
Top Forums Shell Programming and Scripting Extract e-mail addresses on a page Post 302773793 by Chubler_XL on Thursday 28th of February 2013 04:57:44 PM
Old 02-28-2013
Try this:

Code:
grep -oiE '\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b' infile

This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix-mail to external websites/addresses

Hi all, I would like to know if I can send unix mail to 'external email addresses'. My unix server is leo@ABCcompany.com. I am able to send emails to firstname.lastname@ABCcompany.com. But, we have some email addresses in our team on our parent company's server - ex:... (2 Replies)
Discussion started by: Joy_K
2 Replies

2. Shell Programming and Scripting

Extract IP addresses

The only way I could extract the user names and 'from' IP addresses is to use a few temp files. Split up by 'Failed keyboard-interactive' and 'Failed password'. Anyone have any idea to do this all in one go? aaa.bbb.ccc.ddd 2009-03-23 01:28:33 sshd: Failed keyboard-interactive/pam... (2 Replies)
Discussion started by: hazno
2 Replies

3. Shell Programming and Scripting

How can i send mail to multiple addresses in same domain in bash?

Suppose i have a txt file that is the list of the addresses,something like: lala0045 john james lala0234 george james and i want to send an email to lala0045@blabla.com and lala0234@blabla.com,the same domain...what is the exact syntax i should use in my script? there is a command... (10 Replies)
Discussion started by: bashuser2
10 Replies

4. Shell Programming and Scripting

Echo - Sending mail to multiple addresses

Hi, If I want my script to send a mail to multiple recipients I can do the following: if then echo $err_string1 | mailx -s "UAT CPU ALERT" 1@email.com echo $err_string1 | mailx -s "UAT CPU ALERT" 2@email.com fi Can this also be done something like: ... (1 Reply)
Discussion started by: runnerpaul
1 Replies

5. Shell Programming and Scripting

How to extract url from html page?

for example, I have an html file, contain <a href="http://awebsite" id="awebsite" class="first">website</a>and sometime a line contains more then one link, for example <a href="http://awebsite" id="awebsite" class="first">website</a><a href="http://bwebsite" id="bwebsite"... (36 Replies)
Discussion started by: 14th
36 Replies

6. Shell Programming and Scripting

Extract list of IP addresses from a text file.

I have an xml file with IP addresses all over the show. I want to print only the IP addresses and cut off any text before or after the IP address. Example: Note: The IP addresses (x.x.x.x) do not consistently appear in the xml file as per the pattern below. Sometimes there are text before... (8 Replies)
Discussion started by: lewk
8 Replies

7. Shell Programming and Scripting

Perl - match e-mail addresses in multiple files

Hi, I'm trying to write a script that will check multiple files in a directory (all the relevant filenames begin "TT04.NOTES") for e-mail addresses, and then print these addresses to screen with a count at the bottom. I'm a bit of a novice with Perl but thought it would be the best tool for the... (2 Replies)
Discussion started by: wf1974
2 Replies

8. Shell Programming and Scripting

Parse Page Source and Extract Links

Hi Friends, I have a bunch of URLs. Each URL will open up an abstract page. But, the source contains a link to the main PDF article. I am looking for a script to do the following task 1. Read input file with URLs. 2. Parse the source and grab all the lines that has the word 'PDF'.... (1 Reply)
Discussion started by: jacobs.smith
1 Replies

9. Shell Programming and Scripting

Getting web page content and deliver via mail

Guys could you please help. I want to have shell scripts that get the website html content and same time mail html page to DL. Can any1 help here? (2 Replies)
Discussion started by: AnkitC
2 Replies

10. UNIX for Beginners Questions & Answers

Sifting out mail addresses with grep and regex

Hi there from a newbie. So, I have this huuuge portion of mail addresses with names interlaced.. looks like: "name1" <mail1@domain1.com>, "name2" <mail2@domain2.com> ... Sometimes there are no names, just mailaddress. My thought was to use regex with grep. I saved the list in file ma and... (2 Replies)
Discussion started by: dr_xemacs
2 Replies
INNMAIL(1)						    InterNetNews Documentation							INNMAIL(1)

NAME
innmail - Simple mail-sending program SYNOPSIS
innmail [-h] [-s subject] address [address ...] DESCRIPTION
innmail is a Perl script intended to provide the non-interactive mail-sending functionality of mail(1) while avoiding nasty security problems. It takes the body of a mail message on standard input and sends it to the specified addresses by invoking the value of mta in inn.conf. At least one address (formatted for the MTA specified in inn.conf, if it matters) is required. innmail will sanitize the addresses so that they contain only alphanumerics and the symbols "@", ".", "-", "+", "_", and "%". innmail was written to be suitable for the mailcmd setting in inn.conf. OPTIONS
-h Gives usage information. -s subject Sets the Subject: header of the message. A warning is issued if this option is omitted. EXAMPLES
This sends a one-line message to the local user "joe": echo "A one-line message." | innmail -s "Simple message" joe innmail by default is used by INN for sending nightly reports and control message reports. BUGS
innmail fails on addresses that begin with "-", although one might hope that the news server will not need to contact any such addresses. There are many "correct" addresses that will be silently modified by the sanitization process. A news administrator should be careful to use particularly sane addresses if they may be passed to innmail. HISTORY
innmail was written by James Brister <brister@vix.com> for InterNetNews. This manual page was originally written by Jeffrey M. Vinocur. $Id: innmail.pod 7851 2008-05-26 19:33:08Z iulius $ SEE ALSO
inn.conf(5), mail(1). INN 2.5.3 2009-05-21 INNMAIL(1)
All times are GMT -4. The time now is 06:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy