extract-rows
Usage:Description:crux extract-rows [options] <tsv filename> <column name> <column value>
Given a tab-delimited file, a column name and a column cell value, extract the rows that have the matching values for that column.
Input:Output:
- <tsv filename> – A tab-delimited file, with column headers in the first row. Use "-" to read from standard input.
- <column name> – A column name
- <column value> – A cell value for a column
The program prints to standard output the rows for which the value observed in the specified column of the input file match the
Options:<column value>
given on the command line.
--delimiter <char>|tab
– Specify the input and output delimiter to use when processing the delimited file. Default=tab.--header T|F
– Print the header line of the file, in addition to the rows that match. Default=T.--column-type int|real|string
– Specify the data type of the column, either an integer (int
), a floating point number (real
), or astring
. The default value isstring
.--comparison <operator>
– Specify the operator that is used to compare an entry in the specified column to the value given on the command line. Legal values are as folows:The default value is
eq
– The two values are equallt
– The file value is less than the argument valuelte
– The file value is less than or equal to the argument valuegt
– The file value is greater than the argument valuegte
– The file value is greater than or equal to the argument valueneq
– The file value is not equal to the argument valueeq
--verbosity <0-100>
– Specify the verbosity of the current processes. Each level prints the following messages, including all those at lower verbosity levels: 0-fatal errors, 10-non-fatal errors, 20-warnings, 30-information on the progress of execution, 40-more progress information, 50-debug info, 60-detailed debug info. Default = 30.