I have a set of files, all of them nnn.MP4.mov. How could I rename them so that it is just nnn.mov?
nnn.MP4.mov
nnn.mov
ls -1 *.MP4.mov | while read f; do mv -i "$f" "$(basename \"$f\" .MP4.mov)"; done
Edit: completly rewritten.