RE: How to print man pages on letter size paper

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

 



> When I print a man page by using
>         man -t foo | lpr
> it comes out formatted for A4 size paper.  How can I force 
> the output to be for letter size (8-1/2 by 11 in) paper?
> 
> This doesn't look as easy as it ought to be.
> 
> jon
>

This is a script that I call "mantxt" to generate text from
man pages.  Suggestions for improvement are welcome.

Mike

--

#!/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

exit 0

--
Michael D. Berger
m.d.berger@xxxxxxxx 



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

  Powered by Linux