Date: Sat, 04 Apr 2015 13:34:17 -0400 From: Jon Radel <jon@radel.com> To: Nancy Belle <belle@antennex.com>, freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Chop and replace method?? Message-ID: <55202099.9090908@radel.com> In-Reply-To: <DM__150404113753_01984604235@mail.antennex.com> References: <DM__150404113753_01984604235@mail.antennex.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format. --------------ms080003070900070905090001 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 4/4/15 12:48 PM, Nancy Belle wrote: > Hi freebsd-questions > > I have a really big problem to solve and save hours & hours of time to = correct hundreds of file links because of moving a very large section wit= hin a web site. I have this now: > > 1) <a href=3D"../../../archival/archive13/Jan14/Jan114/intro-frankant.h= tml"> > > and need to chop off this portion of above link example: > 2) ../../../archival/archive13/ > > leaving this as the correct link instead: > 3) <a href=3D"Jan14/Jan114/intro-frankant.html"> > > The front portion to chop is always the same while the rest of the link= always varies and should be left as is. > As always, it pays to have a really good backup before applying random=20 scripts that can trash your files in one easy step, particularly those=20 from friendly strangers on the Internet. :-) sed -i .bak 's/href=3D\"..\/..\/..\/archival\/archive13\//href=3D\"/' *.h= tml should do what you asked for. But test on copies. Really! And use a different extension than .bak if you already have .bak files=20 you care about. --Jon Radel jon@radel.com --------------ms080003070900070905090001 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKrzCC BK8wggOXoAMCAQICEQDgI8sVEoNTia1hbnpUZ2shMA0GCSqGSIb3DQEBCwUAMG8xCzAJBgNV BAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJu YWwgVFRQIE5ldHdvcmsxIjAgBgN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QIQc1TlPH1rtM0NYGkN/M4BGzCBwwYLKoZIhvcN AQkQAgsxgbOggbAwgZsxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0 ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMUEwPwYD VQQDEzhDT01PRE8gU0hBLTI1NiBDbGllbnQgQXV0aGVudGljYXRpb24gYW5kIFNlY3VyZSBF bWFpbCBDQQIQc1TlPH1rtM0NYGkN/M4BGzANBgkqhkiG9w0BAQEFAASCAQCe70vmAb5XbWvr bGi9zaGScrAjtbG1PAr+CE05HIzrdQ1DN8MzVyPOsMeMhwZaWdsBvQbZWRyeJMDO3RQcmXK+ xoaZpdvs9V82VQY7SDicYAq0BbMdfxGQGuQzZYiEXH7z2vO1sMyLOrxeTJBxTs4siIpBpnLW 7I8wIXGfUyy1UlLm0YNrHApP2qbjcFIxaoFa4GHK4HB7uBinjk+IA4m9QfVGSKnplvtmPBBk XnDpF964e0DHBKDoQGrs8JFKm4t0bJ98zRV9tgQa5C1qx12OF278521AZOuDcYsdjTD+So4a k6l4gnt+KIckAOpBhSjqnTIVeAmoeu85GX9v2RnBAAAAAAAA --------------ms080003070900070905090001--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55202099.9090908>