The **-q** option
^^^^^^^^^^^^^^^^^

**Syntax**

**-q**\ [**i**\|\ **o**][~]\ *rows*\|\ *limits*\ [**+c**\ *col*][**+a**\|\ **t**\|\ **s**]
    Select specific data rows to be read and/or written.

**Description**

The **-q** option is used to select specific data rows to be read (using **-q** or **-qi**) or written (using **-qo**)
[Default is all rows]. Specify individual rows or row ranges in the format *start*\ [:*inc*]:*stop*, where *inc*
defaults to 1 if not specified, separated by commas [Default reads and writes all rows in order, starting with the first
row (i.e., row 0)]. To read (or write) from a given row until the end of the data, leave off *stop*. To select all the
rows *not* specified by the given ranges, prepend the selected rows with a leading ~. Append one of the following
modifiers to control how the rows are counted [Default is **+a**]:

- **+a** - Count all rows in the data set.
- **+t** - Reset the count at the start of each table.
- **+s** - Reset the count at the start of each segment.

Alternatively, use **+c**\ *col* to indicate that the arguments instead are min/max *data limits* for the values in
column *col*. With **+c**\ *col*, only rows whose data for the given column *col* are within the range(s) given by the
*min*/*max* limits are read (with **-qi**) or written (with **-qo**). **Note**: Because arguments may contain colons or
be negative, you must specify *min*/*max* instead of *start*\ [:*inc*]:*stop*. If *min* or *max* is not given we
default to -infinity and + infinity, respectively (e.g., **-qo**\ 50/**+c**\ 2 will only write records whose z-values (in 3rd column) is ≥ 50
while **-qo**\ /50\ **+c**\ 2 will only write records whose z-values is ≤ 50).

**Note**: Header records do not increase the row counters; only data records do.
