This HTML automatically generated with rman for NEMO
Table of Contents

Name

tabrows - select rows from a table

Synopsis

tabrows [parameter=value]

Description

tabrows selectively copies rows from an input (ASCII) table(5NEMO) . Selection is done by table row numbers, 1 being the first non-comment row. Syntax follows the nemofie(1NEMO) rules. Row selection can be done in any order, e.g. select=3,2,1, as long as comment=f (see CAVEATS below)

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=
input file. No default.
select=
rows to select. Any nemoinp(3NEMO) expression can be used. First row is 1. A special select=-1q is allowed for the last row. [all]
nmax=
Default max allocation of how many can be selected in select= [10000].
comment=t|f
If set, comments will also be processed, but row numbers are only counted for true table rows. The default is that comments will be skipped.
out=
output file. Default is standard output.

Caveats

Although this program uses the new table interface, the nmax= parameter is still needed when comment=t, and thus limits the row count. A better select counter is needed for this.

If comment=t the file is currently processed in streaming mode, thus the select= need to be ordered.

Examples

A contrived example to reverse the even lines in a file:
    nemoinp 1:10:1 | tabrows - 10:1:-2

See Also

tabcols(1NEMO) , awk(1) , tabmath(1NEMO) , tabcomment(1NEMO) , tabtab(1NEMO) , table(5NEMO)

Files

src/kernel/tab

Author

Peter Teuben

Update History


9-Mar-99    V0.9 Created     PJT
5-may-2022    V2.0 converted to table V2 interface, renamed from tablines    PJT
30-mar-2024    V2.2 use in-memory table, and made comment=f the default    PJT


Table of Contents