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
Post a Comment