RE: Bold text in man pages

Subject: RE: Bold text in man pages
From: Mike Stockman <mstockman -at- mac -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Mon, 14 Apr 2003 21:41:15 -0400


On April 14, mcollier -at- maryland -dot- com wrote:

>Anyone know why words in bold text print out with duplicate characters
>when the man page is exported to a text file, and what can be done about
>it?
>
>For example when I do "man ssh > ssh.txt" and open the file in BBEdit or
>TextEdit (Mac OS X) bold words come out as "NNAAMMEE",
>"SSYYNNOOPPSSIISS", etc.

This happens to me on Linux and Cygwin as well as OS X. I don't know why it happens, and I don't know of a "right" way to strip troff formatting from a man page, but I have a workaround to suggest, if plain text from the man page is your ultimate goal.

1. Locate the original man page (use the "locate" command, or look in places like /usr/man/man1/, etc.), then use man2html to convert it to an HTML page, like this:

man2html /usr/man/man1/ssh.1 >~/ssh.html

If the man pages on your system are stored as gzip files (with a .gz extension), copy it elsewhere and gunzip the copy first.

2. Open the resulting file in Lynx (as in "lynx ~/ssh.html") and hit "P" (for Print). One of the choices Lynx will provide is "Save to File," and if you choose that, you'll get a plain text file that's laid out as close to the original HTML as Lynx can get it, which is pretty darn close.

3. Open it in your favorite text editor and dump the first few lines and perhaps the final few lines of filler ("Created by Man2HMTL" and such).

Hope this helps,
Mike

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Purchase RoboHelp X3 in April and receive a $100 mail-in
rebate, plus FREE RoboScreenCapture and WebHelp Merge Module.
Order here: http://www.ehelp.com/techwr-l/


Help celebrate TECHWR-L's 10th Anniversary starting this month!
Check out the contests at http://www.raycomm.com/techwhirl/special/contests/
Happy birthday to you, happy birthday to you, happy birthday TECHWR-L....

---
You are currently subscribed to techwr-l as:
archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.



Follow-Ups:

Previous by Author: Re: New version of Acrobat
Next by Author: RE: YOU are responsible, even when YOU are not to blame
Previous by Thread: [lemay -at- slack -dot- lne -dot- com: Re: Bold text in man pages]
Next by Thread: RE: Bold text in man pages


What this post helpful? Share it with friends and colleagues:


Sponsored Ads