This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
using_awk_on_csv_files [2016/02/29 14:08] Joel Dare |
using_awk_on_csv_files [2016/03/24 16:32] Joel Dare [Unmatched Error] |
||
---|---|---|---|
Line 30: | Line 30: | ||
awk -F "\"*,\"*" '{print $3 "|" $1}' file.csv | awk -F "\"*,\"*" '{print $3 "|" $1}' file.csv | ||
+ | |||
+ | ====== Unmatched Error ====== | ||
+ | |||
+ | If you get an error about an unmatched comma, you are probably trying to run this in a csh shell instead of a bash shell. These shells behave a little differently. Here's the error you'll get. | ||
+ | |||
+ | 'Unmatched ".' | ||
+ | |||
+ | One solution is to run this command from bash. To switch to a bash shell, just run the /bash/ command to switch to a bash shell. | ||
+ | |||
+ | bash | ||
+ | |||
+ | Special thanks to Marina for reporting this error. | ||
====== In an Awk File ====== | ====== In an Awk File ====== |