Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
lexgrog(1)
Edit
PageHistory
Diff
Info
LikePages
lexgrog !!!lexgrog NAME SYNOPSIS DESCRIPTION OPTIONS EXIT STATUS EXAMPLES WHATIS PARSING SEE ALSO NOTES AUTHOR ---- !!NAME lexgrog - parse header information in man pages !!SYNOPSIS __lexgrog__ [[__-m__|__-c__] [[__-fhwV__] ''file'' ... !!DESCRIPTION __lexgrog__ is an implementation of the traditional ``groff guess'' utility in __lex__. It reads the list of files on its command line as either man page source files or preformatted ``cat'' pages, and displays their name and description as used by __apropos__ and __whatis__, the list of preprocessing filters required by the man page before it is passed to __nroff__ or __troff__, or both. If its input is badly formatted, __lexgrog__ will print ``parse failed''; this may be useful for external programs that need to check man pages for correctness. If one of __lexgrog__'s input files is ``-'', it will read from standard input; if any input file is compressed, a decompressed version will be read automatically. !!OPTIONS __-m, --man__ Parse input as man page source files. This is the default if neither __--man__ nor __--cat__ is given. __-c, --cat__ Parse input as preformatted man pages (``cat pages''). __--man__ and __--cat__ may not be given simultaneously. __-w, --whatis__ Display the name and description from the man page's header, as used by __apropos__ and __whatis__. This is the default if neither __--whatis__ nor __--filters__ is given. __-f, --filters__ Display the list of filters needed to preprocess the man page before formatting with __nroff__ or __troff__. __-h, --help__ Print a help message and exit. __-V, --version__ Display version and author information. !!EXIT STATUS __0__ Successful program execution. __1__ Usage error. __2__ __lexgrog__ failed to parse one or more of its input files. !!EXAMPLES $ lexgrog man.1 man.1: !!WHATIS PARSING __mandb__ (which uses the same code as __lexgrog__) parses the __NAME__ section at the top of each manual page looking for names and descriptions of the features documented in each. While the parser is quite tolerant, as it has to cope with a number of different forms that have historically been used, it may sometimes fail to extract the required information. A correct __NAME__ section looks something like this: .SH NAME foo - program to do something Some manual pagers require the `-' to be exactly as shown; __mandb__ is more tolerant, but for compatibility with other systems it is nevertheless a good idea to retain the backslash. On the left-hand side, there may be several names, separated by commas. The text on the right-hand side is free-form, and may be spread over multiple lines. If several features with different descriptions are being documented in the same manual page, the following form is therefore used: .SH NAME foo, bar - programs to do something .br baz - program to do nothing (A macro which starts a new paragraph, like .PP, may be used instead of the break macro .br.) There are several common reasons why whatis parsing fails. Sometimes authors of manual pages replace `.SH NAME' with `.SH MYPROGRAM', and then __mandb__ cannot find the section from which to extract the information it needs. Sometimes authors include a NAME section, but place free-form text there rather than `name - description'. However, any syntax resembling the above should be accepted. !!SEE ALSO man(1), mandb(8), apropos(1), whatis(1). !!NOTES __lexgrog__ cannot parse files containing .so requests. These are probably best checked by other problems, as __lexgrog__ often does not have enough context to know what to do with them. !!AUTHOR The code used by __lexgrog__ to scan man pages was written by: Wilf. (G.Wilford@ee.surrey.ac.uk). Fabrizio Polacco (fpolacco@debian.org). Colin Watson (cjwatson@debian.org). Colin Watson wrote the current incarnation of the command-line front-end, as well as this man page. ----
2 pages link to
lexgrog(1)
:
Man1l
mandb(8)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.