Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'a simple working script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
a simple working script
Authored by: eddybaby on Jan 07, '11 11:52:43AM

i couldn't get the script by Paulo Jorge Gois to work
and i wanted to save the results of the converted pdf only
so i wrote this simple script for dummies like me
it works and should be easy to understand and edit for dummies like me



#!/bin/sh
#
#
# Unix man page to PDF script "
# by eddybaby "
# with thanks to everyone "
#
# this script will convert any Unix man page to PDF format and open it
#
# the pdf is saved to your home folder in a folder named 'unix man pdf's'
#
# you can change the name or the path of the folder
# by editing this script in any text editor
#
# the script first creates a postscript file '.ps'
# then converts it to a pdf
# and then deletes the postscript file
# and then opens the pdf file
#
# how to use this script
#
# you must specify a man document to convert and open"
#
# open the script in a text editor [as you obviosly have done]"
#
# search for the string 'dummy_man_name' and "
# replace it with the the name of the man document you want to convert"
#
# ie - search for the string 'dummy_man_name' and"
# replace it with the string 'find' "
# to convert the unix manual for the find command to a pdf file"
#
#


echo ""
echo ""
echo " ====="
echo ""
echo " Unix man page to PDF script "
echo " by eddybaby "
echo " with thanks to everyone "
echo ""
echo " ====="
echo ""
echo " !!! if you see an error listed below !!!"
echo ""
echo " you did not specify a man document to convert and open"
echo ""
echo " open the script in a text editor"
echo ""
echo " and read the instructions"
echo ""
echo ""
echo " ====="
echo ""
echo ""

man -t dummy_man_name > ~/unix\ man\ pdf\'s/dummy_man_name_unix_command_manual.ps
pstopdf ~/unix\ man\ pdf\'s/dummy_man_name_unix_command_manual.ps ~/unix\ man\ pdf\'s/dummy_man_name_unix_command_manual.pdf
rm ~/unix\ man\ pdf\'s/dummy_man_name_unix_command_manual.ps
open ~/unix\ man\ pdf\'s/dummy_man_name_unix_command_manual.pdf



[ Reply to This | # ]