From owner-freebsd-questions@FreeBSD.ORG Mon Aug 7 18:57:35 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C52CB16A4DA for ; Mon, 7 Aug 2006 18:57:35 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE69643D4C for ; Mon, 7 Aug 2006 18:57:34 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.4/8.13.1) with ESMTP id k77IvKof025095; Mon, 7 Aug 2006 11:57:21 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.4/8.13.1/Submit) id k77IvEl5025094; Mon, 7 Aug 2006 11:57:14 -0700 (PDT) (envelope-from kline) Date: Mon, 7 Aug 2006 11:57:13 -0700 From: Gary Kline To: Garrett Cooper Message-ID: <20060807185713.GA24933@thought.org> References: <20060806221015.GA1039@thought.org> <44D66BD2.8050305@thingy.com> <20060806224732.GA1255@thought.org> <20060807111303.GC667@advent.localdomain> <20060807113359.GD667@advent.localdomain> <44D77CC3.4070503@u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44D77CC3.4070503@u.washington.edu> User-Agent: Mutt/1.4.2.2i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing twenty years of service to the Unix community Cc: freebsd-questions@freebsd.org Subject: Re: Howto insert string. (Was: Re: [freebsd-questions] awk quickie.) 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: Mon, 07 Aug 2006 18:57:35 -0000 On Mon, Aug 07, 2006 at 10:47:47AM -0700, Garrett Cooper wrote: > Kurt Wall wrote: > >On Mon, Aug 07, 2006 at 07:13:03AM -0400, Kurt Wall wrote: > > > >>On Sun, Aug 06, 2006 at 03:47:32PM -0700, Gary Kline wrote: > >> > >>> I've got 80 or so html/php files. Most do have > >>> > >>> > >>> > >>> but a whole slew do not/are missing the BG color code. > >>> So is there some scripto-magic way of finding out which fles are > >>> missing the above string? I know how, using an ed/ex script to > >>> insert this string. > >>> > >>I'd probably do "grep -vi bgcolor filename" > >> > > > >[bad form to reply to my own post, etc.] > > > >Doh! You want to *insert* the string, not (just) find the ones that > >don't have it. My ed/ex chops blow, so with sed: > > > >sed -i '' 's///' file_name > > > >Kurt > You may just want to use CSS as well instead of hardcoding in HTML > values like that. The background-color property is pretty much common > and universal in all browsers, since CSS 1.0(/1.1?). > -Garrett Good thought, indeed. Some (many) years back when I was looking at preparing a book-length doc for the web with HTML I actually did use the style-sheet method. IIRC, it worked well with HTML-2.0. But with my Jotting stuff it got a little fancier, bit-by-bit until I had at least two jpegs/*php plus very light blue formatting [15%, 70%, 15%], and a textured.jpg "paper" bg on the 70%. That's 3 jpegs. I don't know if you can do something like that with CSS. I wound up creating *one* html/php template, and mouse cut-and-pasting my segue, then the
meditation
and after a few hours it was good enough... . I'll check into the style sheets; thanks! gary PS: I also checked out Don Knuth's TeX stuff, but that's waaaaay overkill :-) -- Gary Kline kline@thought.org www.thought.org Public service Unix