NAME

helpm4sh - extract embedded HelpMessage/POD from sh scripts

SYNOPSIS

helpm4sh [--] format[-] [file]

DESCRIPTION

helpm4sh extracts constant help messages from the given file, or from standard input if file is a dash or is not given. If format is helpm, embedded HelpMessage blocks are extracted. The blocks can be either here documents starting by a line matching the regular expression << *"_*(HELPM|HelpM|helpm)(essage)?"$, or be similar here documents in comments.

If format is pod, then here documents (or here documents in comments) delimited by "=cut" are extracted.

If a dash is appended to format, then the here documents are stripped.

EXIT STATUS

If no blocks are found or if "dynamic" blocks (whose delimiter is unquoted) are detected, the return status is non zero.

EXAMPLES

This manual page can be extracted from the script itself:

  $ helpm4sh helpm $(where helpm4sh) | helpm2man - HELPM4SH.1

AUTHOR

helpm4sh was written by G.raud Meyer.

SEE ALSO

helpmessage(5), perlpod(1)