Date: Sat, 04 Apr 2015 18:54:25 -0600 From: jd1008 <jd1008@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Chop and replace method?? Message-ID: <552087C1.4090109@gmail.com> In-Reply-To: <55203049.4010003@radel.com> References: <DM__150404113753_01984604235@mail.antennex.com> <55202099.9090908@radel.com> <552021C5.3010309@gmail.com> <55203049.4010003@radel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?552087C1.4090109>