I often use awk to extract information from .csv files in BASH, including some with double quoted strings containing commas in certain fields - I came across a solution to this awk -vFPAT='([^,]*)|("[^"]+")' -vOFS=,
on the page linked below but since I need to use it often, I'd like to add it as an alias in ~/.bashrc - Does anyone know a safe way I can do this? I'm worried that any solution would be bug-prone.
How to make awk ignore the field delimiter inside double quotes?
Thanks for any suggestions - I realise it might be better to leave this as a comment on the original post but Stackoverflow's reputation-based comment system prohibits this for me.