Awk and setting the FS
I'm writing an awk script to parse a .csv file. These files are unique in that any commas inside quotes must be left alone and the quotes everywhere else changed into pipes.
So far, I have tried setting the field separator to commas and using gsub to swap out quotes with pipes, but that doesn't produce the results I am looking for.
A good example of what I'm trying to do is:
Input:
First Last,"Las Vegas, NV",80
Output:
First Last|Las Vegas, NV|80
Any suggestions would be highly appreciated!
|