[PLUG] gawk: ignoring '@' in email address
Rich Shepard
rshepard at appl-ecosys.com
Mon Feb 8 17:32:13 UTC 2010
My reading of the gawk man page and my Google searches haven't shown me
how to have awk ignore the '@' symbol in an e-mail address.
I have a file where each record looks like this:
First Second e-mail at address
What I want is the file to look like this:
Second [tab]Second[comma space] First[tab]e-mail at address[tab]string
I tried a quickie one-liner from the command line:
awk -f .co-commissioners.addresses '$2 "\t" $2 ", " $1 "\t" $3 "marketing"' > temp.tmp
and get this error:
awk: .co-commissioners.addresses:1: ^ invalid char '@' in expression
How do I specify to awk that the '@' is part of a field?
Rich
More information about the PLUG
mailing list