#!/bin/sh # man2pdf : depends on sh, man and ps2pdf for plop in $* ; do man "$plop" -t > "$plop".ps && ps2pdf "$plop".ps && rm "$plop".ps done
#!/bin/sh # man2pdf : depends on sh, man and ps2pdf usage () { if [ $? -ne 0 ] || [ "$1" == "--help" ] || [ -z $1 ]; then cat <<EOF man2pdf usage: man2pdf [man pages list] note: this program depends on man and ps2pdf EOF exit 1 fi } usage for plop in $* ; do man "$plop" -t 2>&- > "$plop".ps && ps2pdf "$plop".ps && rm "$plop".ps done usage