Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How to replace html tag in multiple files?

So i have many files that contains

<header class="navbar navbar-fixed-top" id="top" role="banner">
    <div class="adminBar">
        <div class="container">
            <div class="content"> </div>
        </div>
    </div>
</header>

which i want to raplece with

<script src="//code.jquery.com/jquery-1.10.2.js"></script><script>$(function(){ $("#header").load("header.html"); });</script> 

trying do it with

find ./ -type f -exec sed -ie 's/<header(.+)((\s)+(.+))+<\/header>/ \<script src\="\/\/code\.jquery\.com\/jquery\-1\.10\.2\.js"\>\<\/script\>\<script\>\$\(function\(\)\{ \$\("#header"\)\.load\("header\.html"\); \}\);\<\/script\> /g' {} \;

fails, any advice please?

Comments