Use awk to pick out zip code
Hi,
Suppose I have a csv file, each line look like this:
ABC Company, 1999, March, caucasian owned, 123 BroadWay NY 92939-2222
How do I create two new columns at the end, one for state, one for zip.
So that the line is
ABC Company, 1999, March, caucasian owned, 123 BroadWay NY 92939-2222,NY,92939-2222
To help you with the code, I've created a list of all possible State Abbreviations.
[AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, ID, IL, IN, IA, KS, LA, MD, MA, MI, MN, MS, MO, MT, NE, NV, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, WA, WV, WI, WY]