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
for i in *; do j=`echo $i | cut -d . -f 1`; j=$j".mov"; mv $i $j; done
this will cut everything before the first dot and appends .mov
but if some files are e.g. hi.2.mov and hi.1.mov one will be overwritten, so use it carefully ^^