extract_usage_from_stx(1)

extract_usage_from_stx1

Extract “usage:” messages from manpages written in stx

Usage

extract_usage_from_stx [ file file ... ]

Overview

Process the given files, which should be manpages written in Stx, stripping away everything that is typically not included in a “Usage:” message. If no files are given, read standard input instead.

A “Usage:” message is a message typically printed when a program is called with incorrect arguments or when help is specifically requested, for example with a --help command line option. A “Usage:” message is typically a subset of the information provided on a command's manual page.

The information left in the “Usage:” message by extract_usage_from_stx includes:

•

the command synopsis, as given in the “SYNOPSIS” section

•

the command line options, as given in the “OPTIONS” section, together with the first sentence of their description. A sentence is taken to end at a period (.).

The output of extract_usage_from_stx is still in Stx format, which you might want to further process to produce the actual “Usage:” message.

Options

--version, -V

Just show version information and exit.

--help, -?

Just show a short help message and exit.

Releases

Unchanged in 9 releases since Debian 4.0 (Etch).

  1. 4.0–12

Bugs

The end-condition of a sentence is too strong.

Author

This manual page was written by Panu A. Kalliokoski.

From stx2any 1.56-2.3 in Debian 12 (Bookworm). Parsed by carta from the page's man source.