Filter CSV rows by the value in a column
filter csv file command line | awk filter csv by column value | extract rows with specific value from csv | awk | csv | filterawk -F';' -v c=3 -v w='active' 'NR == 1 || $c == w' export.csvSplits each line at the given character and prints it if the column exactly matches the value. The first line is always printed so the column headings are kept. For Excel exports created with a German locale, the semicolon is the usual delimiter.
Note: This is a simple split at the delimiter: quoted fields that contain the delimiter themselves are split incorrectly. If the values are quoted, the quotes must also be part of the value searched for.
Also searched as
- filter csv file command line
- awk filter csv by column value
- extract rows with specific value from csv