Date: Fri, 28 May 2010 21:14:38 -0700 From: Gary Kline <kline@thought.org> To: Bob Hall <rjhjr0@gmail.com>, FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: any shortcuts to doc to ascii? Message-ID: <20100529041438.GA82719@thought.org> In-Reply-To: <20100528144538.GA6533@stainmore> References: <20100527013843.GA40751@thought.org> <20100527233607.GD19297@thought.org> <20100528001807.GA3493@stainmore> <201005272253.39561.kline@thought.org> <20100528144538.GA6533@stainmore>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 28, 2010 at 10:45:38AM -0400, Bob Hall wrote: > 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. the DOC file i was trying to convert is only around 250 line [ ascii ] and i finished it, kwik-and-dirty with perl, sed, and vi's regex. it prob'ly isn't worth merely complaining about. doing it one time will, as you point out, let me reuse the script hundred of time. (i bot a sed and awk book few years ago. time to get serious!) tx much gary > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix The 7.83a release of Jottings: http://jottings.thought.org/index.php http://journey.thought.org 99 44/100% Guaranteed Novel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100529041438.GA82719>