I want to rename a list of files which have the name something_accepted.nt to something.nt.
Now my idea was:
Code:
find -iname *accepted.nt | xargs -I @ mv @ $(echo @ | sed "s|_accepted||")
(I've read backticks are deprecated so I replaced them with $(), but I don't know the name of this so I kept the name

))
Strangely this did not work and one researching I found that the following only prints blank lines:
Code:
echo "test" | xargs -I @ echo $(echo @ | echo)
While without pipes it works:
Code:
echo "test" | xargs -I @ echo $(echo @ | echo)
I did search google & this forum but I didn't find a solution so I would like to know a) how I can get this to work and b) if there is another approach that does not use pipes and backticks I would like to know how to use them together anyways.