From owner-freebsd-questions@FreeBSD.ORG Mon Aug 7 17:47:49 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 E8F2416A4DA for ; Mon, 7 Aug 2006 17:47:49 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76C5A43D49 for ; Mon, 7 Aug 2006 17:47:49 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.03) with ESMTP id k77Hlm5r021283 for ; Mon, 7 Aug 2006 10:47:49 -0700 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.03) with ESMTP id k77HlmW5025864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 7 Aug 2006 10:47:48 -0700 Message-ID: <44D77CC3.4070503@u.washington.edu> Date: Mon, 07 Aug 2006 10:47:47 -0700 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20060806221015.GA1039@thought.org> <44D66BD2.8050305@thingy.com> <20060806224732.GA1255@thought.org> <20060807111303.GC667@advent.localdomain> <20060807113359.GD667@advent.localdomain> In-Reply-To: <20060807113359.GD667@advent.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.0.264296, Antispam-Engine: 2.4.0.264935, Antispam-Data: 2006.8.7.102932 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' 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 17:47:50 -0000 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