Bash: Parse CSV with quotes, commas and newlines
As chepner said, you are encouraged to use a programming language which is able to parse csv. Here comes an example in python: import csv with open(‘a.csv’, ‘rb’) as csvfile: reader = csv.reader(csvfile, quotechar=”””) for row in reader: print(row[-1]) # row[-1] gives the last column