From: Sven Mascheck on
WANG Cong wrote:

> find your_dir -name '*.* '-print0 | xargs -0 -I foo echo mv 'foo'
> 'foo.HDR' | sed -e 's/\(.*\)\..*\.HDR$/\1\.HDR/g' | sh

If you start building such literal command lines, you might
prefer handing over the arguments directly to a shell:

find ... -exec sh -c '
for i do [...] ; mv "$old" "$new"; done
' arg0-sh {} +

Thus you can combine the search abilities of find with
the flexibility of a command line (and: avoid potential
new problems with calls like "|sh").