www.delorie.com/djgpp/v2faq/faq5_5.html   search  
Node:Man pages, Next:, Previous:Cannot find docs, Up:Docs

5.5 What are these foo.1 files?

Q: Some docs files are called foo.1 or bar.man or 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 man converts them to formatted text files which are usually displayed with a program like more or 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.

DJGPP binary *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.

Having installed man and Less, you should be able to view *.1 files like e.g. patch.1 with several alternative tools:

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.



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2001   by Eli Zaretskii     Updated Apr 2001