1
File content:
17541 From Email subscription@test.com Inbound Policy Manager Envelope Analysis Profiler 17541 From Email subscription@yahoo.com Inbound Policy Manager Envelope Analysis Profiler 17541 From Domain test.co.uk Inbound Policy Manager Envelope Analysis Profiler 17541 From Domain yahoo.co.uk Inbound Policy Manager Envelope Analysis Profiler 17541 From Email subscription@test.com Inbound Policy Manager Envelope Analysis Profiler
I use that command to extract e-mails and convert them to the new format,but I'm not able to extract domains. I use "sort -u" because some mails are duplicate in the file.
cat 1| grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b"|sed -e 's/^/E,/'|sort -u
Expected view after grep domains:
test.co.uk yahoo.co.uk
What kind of output are you expecting? – Bernhard – 2012-10-16T07:30:00.373
I get this on three separate lines when I try
E,subscription@test.com
E,subscription@yahoo.com
E,subscription@test.com
. How does that differ from what you want? – Nifle – 2012-10-16T07:34:39.730I edit my requested. – Kalin Borisov – 2012-10-16T08:06:26.247