[lug] awk question

John E. Koontz koontz at boulder.nist.gov
Mon Jan 27 17:16:15 MST 2003


At 03:04 PM 1/27/2003 -0700, you wrote:
>Type,Lastname,Firstname,DisplayName,etc,etc
>Mailbox,Harris,Jim,"Harris, Jim",cow,chicken
>Mailbox,Doe,John,"John Doe",etc,etc

Read the line.
Loop over $i, merging any fields that start with " with the next until you 
have a field of the form "...".
Now you have the proper set of fields.

I'm just running out or I'd write it.  It's a bit more code than people 
like to write in AWK, but easily done.


John E. Koontz
NIST 896.04 PCSG
303-497-5180

N39° 59' 42.1" W 105° 15' 49.7"




More information about the LUG mailing list