NAME

helpmselect - filter out sections from a HelpMessage

SYNOPSIS

helpmselect [options] [--] format[-] [file]

DESCRIPTION

helpmselect removes some sections from a HelpMessage read from file or from the standard input. By default all the sections are kept, and none are removed.

If a section matches the ERE (awk Extended Regular Expression) given to --remove, it is removed. Otherwise if it does not match the ERE given to --keep, it is removed. The remaining sections are kept in the standard output. If several identical options are found, the value used is the concatenation of the options separated by spaces.

If --no-header is given, anything that comes before the first section is removed.

OPTIONS

The options are parsed by getopt(1).

-k, --keep regex
-r, --remove regex
-H, --no-header

EXIT STATUS

A non zero exit status would indicate an error for awk itself.

EXAMPLES

In a shell script, make a usage message from the embedded HelpMessage:

  $ helpm4sh $0 2>/dev/null |
    helpmselect --no-header --keep 'SYNOPSIS|OPTIONS' |
    helpm2text

AUTHOR

helpmselect was written by G.raud Meyer.

SEE ALSO

helpmessage(5), helpm2pod(1), helpm2text(1)