Script corrigido:
for file in /home/pintolcv/Downloads/2014*D890.E.m; do
filepath=${file%/*}
filebasename=${file##*/}
#echo "File equals: $file"
#echo "File path equals: $filepath"
#echo "File basename equals: $filebasename"
if [[ -e "$file" ]]; then
echo "File Found: $filebasename - ${filebasename:5:3}"
mv "$file" "$filepath/IP.PMST.BHE..D.2014.${filebasename:5:3}"
else
echo "files do not exist"
fi
done