Libervis Network - For a Free WorldLibervis Projects | Nuxified Projects
Welcome guest. Register | Login | Show what's new

find with -exec

find with -exec
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?

__________________

Disclaimer: My posts may change (dramatically) within the first 15 minutes they're posted.


Sed uses regular

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

__________________

CAN I HAS FIXD CAPSLOK KEE PLZ?

It's not doing that.

But it's not doing that either.

__________________

Disclaimer: My posts may change (dramatically) within the first 15 minutes they're posted.

Just warning you of the next

Just warning you of the next problem since I have no idea what causes the current one Eye-wink

__________________

CAN I HAS FIXD CAPSLOK KEE PLZ?

instead of escaping, just

instead of escaping, just use single quotes (') and then try debugging it

the $( ) is most likely

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 {} {}.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

We have 3062 members who wrote 2053 articles and 11880 comments. Welcome to our newest member, hutopire!

Who's online

There are currently 0 users and 6 guests online.
Nuxified RSS feed