grepcsv
NAME
grepcsv
– print rows from a .csv file that have columns matching
one or more patterns
SYNOPSIS
Usage: grepcsv [-d] [-v] [-H|-h] [-S] [-l] [-n] -f SCRIPTFILE DATAFILE
DESCRIPTION
OPTIONS
general:
- –help
- Print help and exit
- –detailed-help
- Print help, including all details and hidden options, and exit
- –full-help
- Print help, including hidden options, and exit
- -V, –version
- Print version and exit
debugging:
- -d, –debug
- Print random debugging messages
matching control:
- -f, –file=filename
- File holding sed-like script
- -v, –invert-match
- Invert the sense of matches (like `grep(1)`) (default=off)
- -E, –extended-regexp
- Patterns are in "extended regular expression" (ERE) mode (default=off)
- -S, –sed-format
- Patterns actually look like sedcsv(1) scripts (commands ignored) (default=off)
- -w, –word-regexp
- match on whole words
- –cell-regexp
- match must be for the entire contents of the cell
output control
- -c, –count
- Print count of matching lines
- -l, –files-with-matches
- Print names of files with one or more match
- -L, –files-without-match
- Print names of files with no match
- –print-labels
- Print out column labels with each new file (default is, only if labels, or ordering of labels, has changed)
- -m, –max-count
- Quit processing a file after NUM rows have matched
- –no-print-labels
- Do not print out column labels.
- -q, –quiet
- Only print matching (non-matching if `-v`) rows (default=off)
output prefix:
- -H, –with-filename
- Print out the file name for each match (default if more than one input data file)
- -h, –no-filename
- Do not print out the file name for a match (default if only one input data file)
- -n, –row-number
- Print out the row number of matching rows. If column labels are printed, they are printed as row zero ('0'). (default=off)
CSV-specific options:
- –labels
- Use column labels to associate script and data columns (implies "–script-labels" and "–data-labels") (default=off)
- –script-labels
- The script .csv file has column labels (default=off)
- –data-labels
- The data .csv file has column labels (default=off)
- –validate
- make sure the contents of columns are valid .csv (default=off)
- –representation=ENUM
- how should the values of columns be represented? (possible values="csv", "neutral" default=`neutral')
- –ragged
- allow rows to have differing numbers of columns (default=off)
- –ignore-missing
- a guard for a column missing in the input data is assumed to "succeed" (default=off)