I tried Code:
's!\(<meta.*\).$!\1 />!'
with find like this
Code:
find . -name "*.html" -print0 | xargs -0 sed -i 's!\(<meta.*\).$!\1 />!'
It works,but the result contains two ">" like this...
HTML Code:
<meta name="keywords" content="keyword1, keyword2"> />
i could run another sed to replace "> />", but if it is a easy improvement in the find section above?
I played with JCastro's example, but could not get it to work with find piped to sed
I am close and have enough to play further, but any further assistance would be great.
|