1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-24 00:02:09 +02:00
tldr/pages/common/csvcut.md
Sebastiaan Speck 5d3caee147
pages*: remove bold and italic styling (#11777)
* pages*: remove bold and italic styling

* Update pages/common/strings.md

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>

* pages.*: update outdated pages

* Update conky.md

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

---------

Co-authored-by: Juri Dispan <juri.dispan@posteo.net>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-19 17:55:22 +05:30

21 lines
532 B
Markdown

# 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>.
- Print indices and names of all columns:
`csvcut -n {{data.csv}}`
- Extract the first and third columns:
`csvcut -c {{1,3}} {{data.csv}}`
- Extract all columns except the fourth one:
`csvcut -C {{4}} {{data.csv}}`
- Extract the columns named "id" and "first name" (in that order):
`csvcut -c {{id,"first name"}} {{data.csv}}`