write a bash script to replace complex strings in multiple html files in multiple directories for instance
<style> ul { float: left; width: 100%; padding: 0; margin: 0; list-style-type: none; } a { float: left; width: 6em; text-decoration: none; color: #f2eeb3; background-color: #bfab80; padding: 0.2em 0.6em; border-right: 1px solid white; } a:hover { background-color: fuchsia; } li { display: inline; } </style>
in the head
and maybe somthing like
<ul>
<li><a href="#">Link one</a></li>
<li><a href="#">Link two</a></li>
<li><a href="#">Link three</a></li>
<li><a href="#">Link four</a></li>
</ul>
in the body. yes i know i could add css but then the same project exists to write something like
<link rel="stylesheet" type="text/css" href="[login to view URL]">
across multiple pages and directories in the head
than then include the div in the body .
so bash seems the way to go i would also also like a written explanation on how the script works :)
please note php is not acceptable or any script that means i have to open every file