LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

grog

Groff command-line option guesser

TLDR

Guess the groff command needed for a file
$ grog [file.roff]
copy
Guess and immediately run groff
$ grog [file.roff] | sh
copy
Process multiple files at once
$ grog [file1.roff] [file2.roff]
copy
Read from standard input
$ cat [file.roff] | grog
copy

SYNOPSIS

grog [options] [files]

DESCRIPTION

grog analyzes roff input files and suggests the appropriate groff command line. It detects which macro packages and preprocessors are needed by examining document content for macro usage.The tool outputs the complete groff command with correct options, which can be piped to a shell for execution.

PARAMETERS

FILES

Files to analyze; reads standard input if omitted or given as "-".
-C
Enable AT&T troff compatibility mode (also passed through to the guessed command).
-v, --version
Display version information and exit.
-h, --help
Display a usage message and exit.
Any other groff(1) option (e.g. -T, -k) is passed through unchanged to the guessed command line.

INSTALL

sudo apt install groff-base
copy
sudo dnf install groff-base
copy
sudo pacman -S groff
copy
sudo apk add groff
copy
sudo zypper install groff
copy
brew install groff
copy
nix profile install nixpkgs#groff
copy

CAVEATS

Part of groff package. May not detect all requirements. Suggestions should be verified.

HISTORY

grog was developed as part of GNU groff to simplify determining the correct options for complex documents.

SEE ALSO

groff(1), nroff(1), troff(1)

RESOURCES

Copied to clipboard
Kai