So, I have this huuuge portion of mail addresses with names interlaced.. looks like:
Sometimes there are no names, just mailaddress. My thought was to use regex with grep. I saved the list in file ma and tried the command
then I got no output. I fiddled around a little and gave the command
which resulted in a lot of "e> e> m> e> m>m>" each on a new line. So what I see here is the last character of the mail address along with the >. Not far from the wanted result but still not correct. The command doesn't make any sense to me. I'm completely puzzled! Where am I going wrong???
Please help me!
/Lasse
Last edited by RavinderSingh13; 10-01-2019 at 09:07 AM..
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)
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)
Hello,
I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide.
ls -aLl /bin | grep "\(x\)"
Which works, just highlights 'x' where ever, when ever.
I'm trying to to get (?:) to work but... (4 Replies)
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)
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)
Hi
I have an input file with a list of random IP addresses, each on a new line. Below is just an example as I omitted the real IP addresses for obvious reasons.
Input: random_ip.txt
10.0.0.1
10.0.0.1
10.0.0.1
10.0.0.1
10.0.0.1
10.0.0.1
10.0.0.1
10.0.0.1
10.0.0.1
10.0.0.1... (7 Replies)
Hi I normally ask questions on coding but I think there is a code that can do this. I have regular text throughout my file and I want to extract all e-mail addresses from it (rather than going and searching each one).
E-mails all have @ so I assume there is a way.
Thanks
Phil (6 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Let's say if we have a file with a lot of information.
For example:
iiadam
otterhedgehog
kayleigh... (2 Replies)
I wish to traverse all files and folders under a given directory say "/tmp/configuration" and for all ip address mentioned therein.
I tried find ./ -type f | xargs grep "*.*.*.*" but it does not populated the correct results.
Can you please suggest. (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT LINUX
zegrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)