mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-10 15:53:34 +02:00
added csvgrep
This commit is contained in:
parent
7f5bc2fec7
commit
588482fc78
1 changed files with 16 additions and 0 deletions
16
pages/common/csvgrep.md
Normal file
16
pages/common/csvgrep.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# csvgrep
|
||||
|
||||
> Filter CSV rows with string and pattern matching.
|
||||
> Included in csvkit.
|
||||
|
||||
- Find rows that have a certain string in column 1:
|
||||
|
||||
`csvgrep -c {{1}} -m {{string_to_match}} {{data.csv}}`
|
||||
|
||||
- Find rows in which columns 3 or 4 matches a certain regex pattern:
|
||||
|
||||
`csvgrep -c {{3,4}} -r {{regex_pattern}} {{data.csv}}`
|
||||
|
||||
- Find rows in which the "name" column does NOT include the string "John Doe":
|
||||
|
||||
`csvgrep -i -c {{name}} -m {{"John Doe"}} {{data.csv}}`
|
Loading…
Add table
Reference in a new issue