Chop and replace method??

Jon Radel jon at radel.com
Sat Apr 4 18:41:17 UTC 2015


>>
>> 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?

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 at radel.com



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3870 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20150404/e88e1605/attachment.bin>


More information about the freebsd-questions mailing list