Previous:Cannot find docs,
Q: Some docs files are called
baz.nroff, and they seem to be written in some weird format which
is very difficult to read. How can I convert them to readable text files?
A: That weird format is the
troff format which is used for
writing Unix manual pages. The Unix command
them to formatted text files which are usually displayed with a program
less (and here
less is considered to
be more than
more :-)). The formatted file includes bold and
underlined letters produced by over-typing using Backspace characters.
*b.zip distributions include such man pages already
formatted and ready to be browsed. To browse formatted man pages, you
will need to install a clone for the Unix
man command. One such
clone is available from the DJGPP sites.
man knows how to find a manual page file, and will format it if
it isn't formatted already, but to browse these files you will need a
program that can page through a text file and which understands how to
show bold and underlined letters instead of backspace-over-typed
characters. I suggest to download the DJGPP port of GNU Less,
which uses colors to show bold and underlined letters.
man and Less, you should be able to view
*.1 files like e.g.
patch.1 with several alternative
mancommand itself: simply typing man patch from the DOS prompt will cause
manto look for the man page
patch.1and pipe it to Less.
manas its back-end and display the manual page found by
Using Info to display man pages has an advantage of displaying the Info version of documentation if it is available, and the man page version if it's not. So, by using Info, you don't need to bother to remember which version of the docs is available for every topic. Info also knows about special sections in man pages, such as "SEE ALSO", which refer to other man pages, and treats them as hypertext links (i.e., you can press <TAB> to move between the references and press <Enter> to display the man page under cursor).
patchman page highlighted with colors. (You will need to install SED and Gawk, since Emacs invokes them when processing the man page.) Emacs also supports the special sections like "SEE ALSO".
Note that all of these alternatives require
man and Less
to be installed.
The binary distribution of the DJGPP port of
bash includes a
simple SED script called
man2txt.sh which will convert
formatted man pages into plain text; you can then read them with any
text browser or editor. To convert, invoke Sed like so:
sed -f man2txt.sh < file.1 > file.txt
If you want to be able to browse unformatted man pages, get and
install the DJGPP port of Groff.
man will automatically call Groff if it finds an unformatted
page, so all the ways mentioned above to browse man pages will work with
unformatted pages as well, once you install Groff.
Note that, for GNU packages, the man pages aren't always updated on a regular basis. If you need more up-to-date information, see the Info docs.