From owner-freebsd-stable@FreeBSD.ORG Fri Jan 14 08:12:21 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4C3B1065674 for ; Fri, 14 Jan 2011 08:12:21 +0000 (UTC) (envelope-from chris#@1command.com) Received: from mail.1command.com (mail.1command.com [168.103.150.6]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB2E8FC12 for ; Fri, 14 Jan 2011 08:12:21 +0000 (UTC) Received: from webmail.1command.com (localhost.1command.com [127.0.0.1]) by mail.1command.com (8.13.3/8.13.3) with ESMTP id p0E8CBhk095270; Fri, 14 Jan 2011 00:12:18 -0800 (PST) (envelope-from chris#@1command.com) Received: from udns0.ultimatedns.net ([168.103.150.26]) (Local authenticated user inf0s) by webmail.1command.com with HTTP; Fri, 14 Jan 2011 00:12:18 -0800 (PST) Message-ID: <4fd80e5737354bd0b141fb3fa073e3ce.HRCIM@webmail.1command.com> In-Reply-To: <0652cc7e3380a4dd8333ff7739396560.HRCIM@webmail.1command.com> References: <20110112070009.GB20924@lava.net> <20110112223229.GB65854@rancor.immure.com> <0652cc7e3380a4dd8333ff7739396560.HRCIM@webmail.1command.com> Date: Fri, 14 Jan 2011 00:12:18 -0800 (PST) From: "Chris H" To: freebsd-stable@freebsd.org User-Agent: HRC Internet Messaging/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Subject: Re: sed is broken under freebsd? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 08:12:22 -0000 On Fri, January 14, 2011 12:01 am, Chris H wrote: > > On Thu, January 13, 2011 11:45 am, Alban Hertroys wrote: > >> On 13 Jan 2011, at 6:10, Chris H wrote: >> >> >>> FWIW On a hunch, I just performed an experimentwith sed(1) >>> against gsed on 50,000 html documents. My mission; to replace all instances >>> of: >>> >>> >>> >>> >>> >>> with: >>> >>> >>> >>> >>> >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >>> >>> >>> >> >> >> I do hope you didn't orphan a -tag there? >> > > LOL Good catch! > Nope. I guess my copy/paste skills aren't so good, when it comes > to my mail reader. :) > > This is the actual script I used: > > > fixem.sh #!/bin/sh - > # WARNING - there is NO turning back! > for name in $(find . -type f -name '*.html') do sed -f fixem.sed <$name >temp.txt > mv temp.txt $name done rm -f temp.txt > > fixem.sed /\/d > s/\/\<\?xml\ version\=\"1\.0\"\ encoding\=\"UTF\-8\"\?\>\ \<\!DOCTYPE\ > html\ PUBLIC\ \"\-\/\/W3C\/\/DTD\ XHTML\ 1\.0\ Strict\/\/EN\"\ \ > \"http\:\/\/www\.w3\.org\/TR\/xhtml1\/DTD\/xhtml1\-strict\.dtd\"\>\ > \ dir\=\"ltr\"\>\ \/s OK I'm clearly crap when it comes to mail readers. Before someone points this out, I'll mention it now: the last line has a mistake dir\=\"ltr\"\>\ \/s should have been dir\=\"ltr\"\>\ \/g _________________________^ in other words; should have ended with a "g" 'nuf said. --Chris > > > > --Chris > > > > > > >> >> >> Alban Hertroys >> >> >> >> -- >> If you can't see the forest for the trees, >> cut the trees and you'll see there is no forest. >> >> >> !DSPAM:74,4d2f565011879296619823! >> >> >> >> >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >> >> >> > > > -- > > > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > --