any shortcuts to doc to ascii?
Gary Kline
kline at thought.org
Sat May 29 04:14:43 UTC 2010
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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
--
Gary Kline kline at 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
More information about the freebsd-questions
mailing list