[nSLUG] Find and replace command

Trina Conrad trina.hanson79 at gmail.com
Thu Oct 2 23:10:41 ADT 2014


Who uses Windows these days?  Such an antiquated system...lol

Trina

On Thu, Oct 2, 2014 at 10:57 PM, Oliver Doepner <odoepner at gmail.com> wrote:

> Great to hear it worked fine for your purposes. :o)
>
> By the way, the same command could be used on Windows.
> You would just have to install Cygwin first. :o)
>
> Cheers
> Oliver
>
> On Thu, Oct 2, 2014 at 10:39 PM, Trina Conrad <trina.hanson79 at gmail.com>
> wrote:
>
>> Hello Oliver,
>>
>> You are correct in your assumptions.  I ran your suggestion and it worked
>> like a charm.  Thank you so very much. :)
>>
>> Trina
>>
>> On Thu, Oct 2, 2014 at 10:36 PM, Oliver Doepner <odoepner at gmail.com>
>> wrote:
>>
>>> Assuming you have only one opening body tag in your html files and you
>>> want to get rid of all the body tag attributes and your html files all have
>>> .html extension :
>>>
>>> find -iname '*.html' -print -exec sed -i 's/<body[^>]*>/<body>/' {} \;
>>>
>>> The -print is so that you see the paths of the files being processed.
>>>
>>> _______________________________________________
>>> nSLUG mailing list
>>> nSLUG at nslug.ns.ca
>>> http://nslug.ns.ca/mailman/listinfo/nslug
>>>
>>>
>>
>> _______________________________________________
>> nSLUG mailing list
>> nSLUG at nslug.ns.ca
>> http://nslug.ns.ca/mailman/listinfo/nslug
>>
>>
>
>
> --
> Oliver Doepner
> http://doepner.net/
>
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20141002/6994e211/attachment.html>


More information about the nSLUG mailing list