Forrest logo
tool overview
On this page you find all important commands for the CLI tool csvgrep. If the command you are looking for is missing please ask our AI.

csvgrep

csvgrep is a command-line tool used for searching and filtering CSV files based on specific criteria. It allows users to query CSV files using regular expressions or simple string matching on specific columns.

Some key features of csvgrep are:

  1. Searching: csvgrep enables you to search for specific patterns or values within CSV files. You can search for exact matches, partial matches, or pattern matches using regular expressions.

  2. Filtering: It allows you to filter rows based on specific conditions. You can filter rows that match specific values in certain columns or rows that meet certain criteria like greater than, less than, or equal to a specific value in a particular column.

  3. Column selection: csvgrep also supports column selection, which means you can choose to display only specific columns of the CSV file in the output. This is helpful when you are interested in only certain information rather than the entire dataset.

  4. Flexible output: The tool provides various output options, including printing the filtered results to the console or saving them to a new CSV file. This gives you flexibility in how you want to use the filtered data.

Overall, csvgrep is a powerful command-line tool that simplifies the process of searching and filtering data within CSV files, making it a useful tool for data analysis, data cleansing, and data manipulation tasks.

List of commands for csvgrep:

  • csvgrep:tldr:7b34d csvgrep: Find rows in which columns 3 or 4 match a certain regular expression.
    $ csvgrep -c ${3,4} -r ${regular_expression} ${data-csv}
    try on your machine
    explain this command
  • csvgrep:tldr:cae6e csvgrep: Find rows in which the "name" column does NOT include the string "John Doe".
    $ csvgrep -i -c ${name} -m "${John Doe}" ${data-csv}
    try on your machine
    explain this command
  • csvgrep:tldr:eb8b6 csvgrep: Find rows that have a certain string in column 1.
    $ csvgrep -c ${1} -m ${string_to_match} ${data-csv}
    try on your machine
    explain this command
tool overview