5

awk: Print fields between two delimiters on separate lines and send to variables

view full story
linux-howto

http://www.unix.com – I have email headers that look like the following. In the end I would like to accomplish sending each email address to its own variable, such as: [email protected]='[email protected]' [email protected]='[email protected]' [email protected]='[email protected]' etc... I know the sed to get rid of the extra characters but I just need to know how to get all of the email addresses. So basically I need to run the awk between "X-Envelope-To: " and "X-". Then I need to know how to send the printed fields to their own variables as explained above. I've been at this for a while and can't (HowTos)