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

Click here to return to the 'View nicely formatted 'man' pages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View nicely formatted 'man' pages
Authored by: andyinindy on Oct 04, '04 02:31:47PM
Oh, and here's the script without the /Users/andy part (so it'll work on your system):

tell application "Finder"
	display dialog "Please enter the terminal command name for which you would like a PDF-formatted man page:" default answer ""
	set commandName to the text returned of the result
end tell
set myGrog to (do shell script "man -w " & commandName)
set myGroff to (do shell script "grog " & myGrog)
do shell script myGroff & " > $HOME/Desktop/" & commandName & ".ps"
do shell script "open $HOME/Desktop/" & commandName & ".ps"

[ Reply to This | # ]