You??™ll find some in /usr/share/man/*; they??™re compressed, so copy them to a temporary
directory and unzip them to try out Groff.
The following commands copy the chown man page to the /tmp directory, unzip it, and format it
in plain text so you can page through it on your screen:
$ cp /usr/share/man/man1/chown.1.gz /tmp
$ gunzip /tmp/chown.1.gz
$ groff -Tascii -man /tmp/chown.1 | less
In this example, the chown man page (chown.1.gz) is copied to the /tmp directory, unzipped
(using gunzip), and output in plain text (-Tascii) using the man macros (-man). The output is
piped to less, to page through it on your screen. Instead of piping to less ( | less), you can
direct the output to a file (> /tmp/chown.txt). You can also make the command shorter by piping
the commands together. For example:
$ gunzip < /usr/share/man/man1/chown.1.gz | groff -Tascii -man | less
To format a man page for typesetting, you can specify PostScript or HP LaserJet output. Direct the
output to a file or to a printer. Here are a couple of examples:
$ groff -Tps -man /tmp/chown.1 > /tmp/chown.ps
$ groff -Tlj4 -man -l /tmp/chown.1
The first example creates PostScript output (-Tps) and directs it to a file called /tmp/chown.ps.
That file can be read by a PostScript previewer (such as Ghostscript) or sent to a printer (lpr
/tmp/chown.
Pages:
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071