Re: suppressing special output from troff -Tascii
-----BEGIN PGP SIGNED MESSAGE-----
> I am trying to transfer some troff files to straight ascii, but I keep
> getting intermixed control characters and extra characters in its attempt
> to deal with bold, underscore, and other format issues.
> Is there a way to get troff to not do these formatting steps? As an
> alternative how can I get sed or some other text manipulator to take
> the three character sequence <characterX><control-H><characterX> into
> simply <characterX>?
As far as I can tell, the following will do it.
sed -e 's/.'$'\b''//g' < troff-file > ascii-file
where troff-file is your troff-formatted file, and ascii-file is where
you want to put the plain ascii output. The ugly $'\b' in the middle
is a way to tell bash you want a backspace character passed. If you
don't use bash, you'll have to take a peek at your shell's manual.
I tried it with a few manpages, looks good.
Reply to: email@example.com
PGP public key fingerprint: 11 43 A9 04 7C 11 41 44 5F FC 69 B1 B6 0A ED 78
E-mail me to receive the actual public key.
-----BEGIN PGP SIGNATURE-----
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
-----END PGP SIGNATURE-----
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .