RE: How to print man pages on letter size paper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 9:24 PM -0500 2/7/06, Michael D. Berger wrote:
 ...
>This is a script that I call "mantxt" to generate text from
>man pages.  Suggestions for improvement are welcome.

OK!

>--
>
>#!/bin/bash
>if test $# != 2; then
>   echo "Calling Format: mantxt <section> <name>"
>   exit 1
>fi
>
>if test -f /usr/share/man/man$1/$2.$1.gz; then
>   zcat /usr/share/man/man$1/$2.$1.gz | groff -Tascii -mandoc | col -b
>elif test -f /usr/share/man/man$1/$2.$1; then
>   cat /usr/share/man/man$1/$2.$1 | groff -Tascii -mandoc | col -b
>elif test -f /usr/share/man/man$1/$2.$1ssl.gz; then
>   zcat /usr/share/man/man$1/$2.$1ssl.gz | groff -Tascii -mandoc | col -b
>else
>   echo "cannot find file"
>fi

According to man man, you can use -W to get the path to the man page in a
form useful to xargs, something like:

    man -W $1 $2 | xargs zcat | groff -Tascii -mandoc | col -b

>
>exit 0

____________________________________________________________________
TonyN.:'                       <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
      '                              <http://www.georgeanelson.com/>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux