Skip to content

qsv search --select for a column with a dash? #2098

Answered by aborruso
rzmk asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rzmk, two ways among many:

qsv search -s /item-thing/ "comb" input.csv
qsv search -s 2 "comb" input.csv

There is a good documentation.

qsv search --help

Basically it's qsv search [options] <regex> [<input>]

In the option you have -s: Select the columns to search. See 'qsv select -h' for the full syntax.

And once again a good documentation for select. If you run

qsv select -h

you get several examples

  Select the first and fourth columns:
  $ qsv select 1,4

  Select the first 4 columns (by index and by name):
  $ qsv select 1-4
  $ qsv select Header1-Header4

  Ignore the first 2 columns (by range and by omission):
  $ qsv select 3-
  $ qsv select '!1-2'

  Select the third column …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rzmk
Comment options

rzmk Aug 31, 2024
Maintainer Author

Answer selected by rzmk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants