Been at this all morning and fail on every attempt.
I have a file called sitemapindex.xml
Its contents just are names of the other sitemaps. Google gets pissy because it isn't in a http:// format.
So, I need "<loc>sitemap-c1mediawiki-............</loc>" to be replaced with "<loc>http://domain.tld/sitemap-c1mediawiki-............</loc>".
Here's the expression I've been trying:
find /path/to/site/sitemap-index-c1mediawiki* -type f | xargs sed -i 's/[<loc>sitemap]/[<loc>
http://domain.tld/]/'
It fails.
I've tried with and without brackets.
Thoughts?