From owner-freebsd-questions@FreeBSD.ORG Fri May 28 14:45: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 297661065672 for ; Fri, 28 May 2010 14:45:43 +0000 (UTC) (envelope-from rjhjr0@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id D32E48FC12 for ; Fri, 28 May 2010 14:45:42 +0000 (UTC) Received: by gwj23 with SMTP id 23so725556gwj.13 for ; Fri, 28 May 2010 07:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=gvsgdgk6lvrpCkXnLnyNVLVJyz85hINMtd8juNxCFzE=; b=LY/GGc5L0ujkgGWL5ShwHB3Q+wwOqkOY0BicwYLMIeu37VknDUsPf5E3yyO6tx6qOu BWxm8PBFcrjNjXV/s/D+xt6C0YJi9CkOGUJGs4EuchZwYWJ5xiX1rDNxCY9Ny4tpeVAG M/QQG9lhBahJ+gC3uGA4+2jU6KwYfj4LjnqDw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; b=P19rXk0XZ/eJHMK8of478iTEjNljcUdwmsfyT4beC/mFbj4lt5noEUwpqSCI7eXF8S l1YR5Vj1S2IhoJCFkxeixpA8bQGsdkOscww2ZGhY/JawoKrafOo/uHCS96A06bs512YN vpWt4+aLp+SnJJTYCvpccADaaMmkPD6kJVpsQ= Received: by 10.150.48.40 with SMTP id v40mr1681801ybv.232.1275057941932; Fri, 28 May 2010 07:45:41 -0700 (PDT) Received: from localhost (ip98-163-115-74.dc.dc.cox.net [98.163.115.74]) by mx.google.com with ESMTPS id w6sm20041789ybe.17.2010.05.28.07.45.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 May 2010 07:45:40 -0700 (PDT) Date: Fri, 28 May 2010 10:45:38 -0400 From: Bob Hall To: FreeBSD Mailing List Message-ID: <20100528144538.GA6533@stainmore> Mail-Followup-To: Bob Hall , FreeBSD Mailing List References: <20100527013843.GA40751@thought.org> <20100527233607.GD19297@thought.org> <20100528001807.GA3493@stainmore> <201005272253.39561.kline@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201005272253.39561.kline@thought.org> User-Agent: Mutt/1.4.2.3i 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: Fri, 28 May 2010 14:45:43 -0000 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.