mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 21:15:26 +02:00
added csvcut
This commit is contained in:
parent
fbb3ed8093
commit
b3710bc9a1
1 changed files with 20 additions and 0 deletions
20
pages/common/csvcut.md
Normal file
20
pages/common/csvcut.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# csvcut
|
||||
|
||||
> Filter and truncate CSV files. Like unix "cut" command, but for tabular data.
|
||||
> Included in csvkit.
|
||||
|
||||
- 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}}`
|
Loading…
Add table
Reference in a new issue