Previous: Invocation Examples, Up: Invocation Examples


2.6.1 grog

grog reads files, guesses which of the groff preprocessors and/or macro packages are required for formatting them, and prints the groff command including those options on the standard output. It generates one or more of the options -e, -man, -me, -mm, -mom, -ms, -mdoc, -mdoc-old, -p, -R, -g, -G, -s, and -t.

A special file name - refers to the standard input. Specifying no files also means to read the standard input. Any specified options are included in the printed command. No space is allowed between options and their arguments. The only options recognized are -C (which is also passed on) to enable compatibility mode, and -v to print the version number and exit.

For example,

     
     grog -Tdvi paper.ms

guesses the appropriate command to print paper.ms and then prints it to the command line after adding the -Tdvi option. For direct execution, enclose the call to grog in backquotes at the UNIX shell prompt:

     
     `grog -Tdvi paper.ms` > paper.dvi

As seen in the example, it is still necessary to redirect the output to something meaningful (i.e. either a file or a pager program like less).