Extract the first and third columns

csvcut

  • Filter and truncate CSV files. Like Unix's `cut` command, but for tabular data.
    Included in csvkit.
    More information: <https://csvkit.readthedocs.io/en/latest/scripts/csvcut.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

csvcut -c {{1,3}} {{data.csv}}

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