find with -exec
Thu, 2006-06-01 03:16
find *.html . -exec mv \{\} $(echo \{\}|sed -e 's/.html/.xhtml/' -) \;
mv: `./19-468.html' and `./19-468.html' are the same file
mv: `./13-468.html' and `./13-468.html' are the same file
...Why isn't the sed expression running/working?










Sed uses regular expressions, so .html will match [any character]html . That doesn't answer your question, but could make things go wrong in this way:
book_about_html.html -> book_about.xhtml.html
But it's not doing that either.
Just warning you of the next problem since I have no idea what causes the current one
instead of escaping, just use single quotes (') and then try debugging it
the $( ) is most likely being interpreted by your shell, as I can spot no counter-measure you have taken. Thus, to find, you want
mv {} {}.