#!/bin/bashSo, if i have a filename with a.xxx.01.avi and i wanted to remove the xxx part, i only need to execute the script and every file with that pattern will be changed to a.01.avi.
LS=`ls *`
for FILE in $LS
do
name=`ls $FILE | cut -d . -f1`
name1=`ls $FILE | cut -d . -f3`
name2=`ls $FILE | cut -d . -f4`
mv $FILE "$name.$name1.$name2"
done
Simple huh?