column

Updated: 23 April 2023

Search through a directory of csv files and display the results in a table:

grep --color=always -h -r "70\.00" my-csv-files | sed "s/^[ \t]*//" | column -t -s,
  • --color=always preserve match colour, even after piping.
  • -h do not show filenames.
  • -r search through all files in directories.
  • sed "s/^[ \t]*//" remove leading whitespace from lines.
  • -t create a table.
  • -s, specify the separator to use.

Leave a comment