This HTML automatically generated with rman for NEMO
Table of Contents


tabcomment - Add comments to a table, or comment certain lines, or

show just comments


tabcomment in= out= [parameter=value]


tabcomment comments selected lines of a text file.

A comment line is a line that starts with a # symbol, and is recognized as such by many NEMO and other kind of programs.

Comment lines can be selected as lines that are blank, start with an alpha or start with punctuation ( in particular the functions isspace, isalpha and ispunct from ctype(3) are used to detect this, always skipping initial whitespace of course) Individual control over each of these types can be given, see below.

Other common comment characters are: ; ! C /, but they are all caught with these defaults.


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.
input ascii table. No Default.
output ascii table. No Default. Use "out=-" if stdout is preferred.
Comment lines that start with alpha? See isalpha(3) [Default: t].
Comment blank lines (lines that only contain blanks, see isspace(3) ) [Default: t].
Comment lines that start with a punctuation character, except the + or -. (neither control nor alphanumeric, see also ispunct(3) ). [Default: t].
Delete comment lines from output? [Default: f].
In raw mode only the comments are shown. [Default: f].
The actual comment character to be used at the beginning of the line. Although it is not adviced to use anything but the ’#’ symbol, the comment characters. Default: #.


Historically this program was written because some programs could not deal with comments in tables, thus we often wind up with constructs such as
      program1 | tabcomment - delete=t | program2
but especially if the tail end of the pipe has to filter down to numbers, the txtpar(1NEMO) can be useful.

See Also

tr(1) , grep(1) , isalpha(3) , txtpar(1NEMO) , table(5NEMO) , ascii(7)


Peter Teuben

Update History

01-aug-1992    V1.0 Created    PJT
14-sep-1992    V1.1 added delete=; also updated man    PJT
20-may-1993    updated man    PJT
18-oct-2004    V2.0 allow change of comment character    PJT
10-apr-2022    V2.1 new table I/O, add raw=, default out=-    PJT
27-apr-2023    V2.3 don’t view + and - as punctuation        PJT

Table of Contents