Print the lines in the specified .csv file that match a SQL query to stdout

textql

  • Execute SQL against structured text like csv or tsv files.
    More information: <https://github.com/dinedal/textql>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

textql -sql "{{SELECT * FROM filename}}" {{path/to/filename.csv}}

click the source code to copy install textql on any operating system with command-not-found.com