From owner-freebsd-questions@FreeBSD.ORG Sat May 29 04:14:43 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9FBC1065676 for ; Sat, 29 May 2010 04:14:43 +0000 (UTC) (envelope-from kline@thought.org) Received: from ethic.thought.org (plato.thought.org [209.180.213.209]) by mx1.freebsd.org (Postfix) with ESMTP id 596AC8FC0A for ; Sat, 29 May 2010 04:14:42 +0000 (UTC) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by ethic.thought.org (8.14.3/8.14.3) with ESMTP id o4T4EdeU042204; Fri, 28 May 2010 21:14:39 -0700 (PDT) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Fri, 28 May 2010 21:14:38 -0700 (PDT) Date: Fri, 28 May 2010 21:14:38 -0700 From: Gary Kline To: Bob Hall , FreeBSD Mailing List Message-ID: <20100529041438.GA82719@thought.org> References: <20100527013843.GA40751@thought.org> <20100527233607.GD19297@thought.org> <20100528001807.GA3493@stainmore> <201005272253.39561.kline@thought.org> <20100528144538.GA6533@stainmore> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100528144538.GA6533@stainmore> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 23 years of service to the Unix community. X-Spam-Status: No, score=0.4 required=3.6 tests=ALL_TRUSTED,BAYES_00, GUARANTEED_100_PERCENT,J_CHICKENPOX_42,T_RP_MATCHES_RCVD autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on ethic.thought.org Cc: Subject: Re: any shortcuts to doc to ascii? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 May 2010 04:14:43 -0000 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