Date: Fri, 28 May 2010 10:45:38 -0400 From: Bob Hall <rjhjr0@gmail.com> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: any shortcuts to doc to ascii? Message-ID: <20100528144538.GA6533@stainmore> In-Reply-To: <201005272253.39561.kline@thought.org> References: <20100527013843.GA40751@thought.org> <20100527233607.GD19297@thought.org> <20100528001807.GA3493@stainmore> <201005272253.39561.kline@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 27, 2010 at 10:53:39PM -0700, Gary Kline wrote: > On Thursday 27 May 2010 05:18:07 pm Bob Hall wrote: > > On Thu, May 27, 2010 at 04:36:08PM -0700, Gary Kline wrote: > > > ps: antiword same as catdoc. back to my per substitutions. > > > that works, along with vi's Builtin subs. > > > > Have you considered using whatever replaces the most special characters, > > and fixing the few characters that remain with sed? > > exactly!!! Another possibility, if you haven't considered it, is using sed to convert everything. If you know all the characters that need to be swapped out, you can write a sed script that will do it for you in one pass. If you don't know sed, creating the script may be a PITA, but you'll only have to do it once, and then you can reuse the script whenever needed. As I recall, the hard part is figuring out how to represent the special characters in sed. It's been a few years since I used sed on doc files, but I recall that the character codes that displayed on my screen were not the codes that I needed to use in sed scripts.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100528144538.GA6533>