Skip to content

Instantly share code, notes, and snippets.

@cdolek
Created June 3, 2017 00:26
Show Gist options
  • Save cdolek/721339e189dd3d33921d817bb955060a to your computer and use it in GitHub Desktop.
Save cdolek/721339e189dd3d33921d817bb955060a to your computer and use it in GitHub Desktop.
Filter CSV by length of string in a column
# Gets line if string in the first column is longer than 6
cat file.csv | awk -F "," 'length($1)>6' > file_longerthan6chars.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment