grog
Display formatted manual pages
SYNOPSIS
grog [options] [files...]
PARAMETERS
-T device
Specify the output device type. This option overrides any device type specified in the input files.
-m macros
Specify additional macro packages to be used. This option can be used to include custom or non-standard macro packages.
-w
Print only the command line needed to format the file, without executing it.
-z
Passes the '-z' option to the `man` command.
-p
Passes the '-p' option to the `man` command.
-s
Passes the '-s' option to the `man` command.
-?
Show help text and exit.
-v
Show version information and exit.
DESCRIPTION
The grog
command analyzes manual pages or troff files to determine the correct man
or troff
command line needed to display them. It attempts to parse the input file and extract information such as the title, manual section, and date. grog
is particularly useful in scripts or when you're unsure of the exact manual page format. It tries to determine the appropriate options to pass to troff
or other formatting tools to correctly render the document. It can handle various manual page formats and provide a reasonable guess for displaying it. The command is useful as a 'guess' tool that can be chained with `man` to display a manual page for an unknown command.
CAVEATS
grog
relies on parsing the input file, and its accuracy depends on the manual page following standard conventions. Complex or malformed manual pages might not be correctly analyzed. Because `grog` executes commands to analyze manual pages, it should be treated carefully regarding security.
USAGE EXAMPLES
grog myfile.man
Analyzes 'myfile.man' and prints the recommended troff
or man
command to format it.
grog -w myfile.man
Prints the command line without executing it.
man `grog myfile.man`
Executes the command determined by grog to display the manual page.
HISTORY
The `grog` command was developed to simplify the process of displaying manual pages, particularly when dealing with custom or unusual manual page formats. It aimed to automate the determination of the correct troff
or man
command line, reducing the need for manual inspection of each file. It originated to abstract the complexity of manually executing troff with the correct parameters, making the process simpler and easier for users.