Files in CSV (comma-separted values) format contain tabular data, with rows separated by newlines and columns—normally—separated by a comma (,). Not every newline has to be a row separator.

There are many CSV variants (partly caused by language settings of the generating spreadsheet programs), so the separator might differ (semi-colon is common in CSVs generated by German software, tabs in others) and cell content might not be quoted ("...")if not necessary (if not containing the separator character nor any newlines).

Tools like awk and grep are only suitable for simplified CSV files without quotes and cells with newlines. Use for those files not .

For normal CSV files (quotes around fields, newlines and separator character in fields), use a proper CSV parser and tell it what quoting rules the file uses—see Is there a robust command line tool for processing csv files?

history | show excerpt | excerpt history