You know those annoying times when you see a list of emails like this:
“John Smith” <[email protected]>
Harry Bo <[email protected]>
Lillian Frog <[email protected]>
<[email protected]>
And your task is to get rid of everything that isn’t the email itself?
Well look no more! I have a simple sed command which removes everything up to and including the left arrow for each line. Simply run this linux/unix command on a filename and give it an output filename, press enter, and bobs-your-uncle you have a new file with no names at the start.
sed 's/.*<//g' filename.txt > filename.done.txt
You will still have to open up a file and do a find and replace on the right arrow, but it saves some time! I did this for a file containing lots of email addresses a few months ago, and thought that I’d share it with the world. Hope it helps others out there.
No comments yet.
Leave a comment