From owner-freebsd-questions@FreeBSD.ORG Sun Apr 5 00:54:33 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06B9B41D for ; Sun, 5 Apr 2015 00:54:33 +0000 (UTC) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD432A52 for ; Sun, 5 Apr 2015 00:54:32 +0000 (UTC) Received: by ierf6 with SMTP id f6so1558580ier.2 for ; Sat, 04 Apr 2015 17:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=+kwyiwhg0nDF5mJTanvnPKKKABNO76YaHIFHWC2l16Y=; b=TjajUV9EZNpVCH+l2h1hh/f6XrTzwkDSuNnH7N2fP3jKvou7ClbFKnKPIaBfm9ryCM o8TCZCVB1iGStnPR2H4ObGHPSarU8n//07HDvY4GJdWCvP48/lUsR5TLDC18u0rboTcO XYJLS8C4doe9mDb4P92cJKmjFH6GY416aydr1KV7T3Q4HVXedVVlnkA0Ifm7cdzsrFSy XI+dqRV9xP5E+jZgNtbw2WNezzSLr87dQ8CSyjIhl7ZxhT1c24rCYDpsgaKLLKBIC6+Z jtDeeaetPQeBJO7aF5lUT0kRF4JA1jDbFF6+jqh/nB9gYzDpDR4+36WcMNrYkMDIku2O OjLg== X-Received: by 10.107.132.223 with SMTP id o92mr13034309ioi.49.1428195272119; Sat, 04 Apr 2015 17:54:32 -0700 (PDT) Received: from localhost.localdomain ([50.243.6.59]) by mx.google.com with ESMTPSA id t1sm437614igs.0.2015.04.04.17.54.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Apr 2015 17:54:30 -0700 (PDT) Message-ID: <552087C1.4090109@gmail.com> Date: Sat, 04 Apr 2015 18:54:25 -0600 From: jd1008 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Chop and replace method?? References: <55202099.9090908@radel.com> <552021C5.3010309@gmail.com> <55203049.4010003@radel.com> In-Reply-To: <55203049.4010003@radel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 00:54:33 -0000 On 04/04/2015 12:41 PM, Jon Radel wrote: > >>> >>> sed -i .bak 's/href=\"..\/..\/..\/archival\/archive13\//href=\"/' >>> *.html >>> >> should not the args include >> >> -s, --separate >> >> consider files as separate rather than as a single >> continuous long stream. >> > > ?? There is no -s option for sed in either 8.4 or 10.1 base > version. Which sed is that? FSF running on a Linux box, per chance? > I am using Fedora Linux, with sed-4.2.2-9.fc21.x86_64 Sorry, I did not mean to cause any confusion. As old as sed is, I was not expecting the args to be so different. Did not know that the freebsd sed does not have this arg. My FBSD machine died :( > in any case > > --- > -i extension > Edit files in-place similarly to -I, but treat each file > indepen- > dently from other files. In particular, line numbers in > each > file start at 1, the ``$'' address matches the last line > of the > current file, and address ranges are limited to the > current file. > (See Sed Addresses.) The net result is as though each > file were > edited by a separate sed instance. > --- > > covers what you need in FreeBSD sed. > > --Jon Radel > jon@radel.com > > >