XML : Trying to rename an extension, getting errors

  root@myhost# ./removedott.sh  Mon Nov 23 10:07:04 EST 2015 - Renaming tester.xml.P.T extension to xml  mv: `tester.xml.P.T' and `tester.xml' are the same file    

removedott.sh:

  if [[ $(find . -type f -name "*.T"  | wc -l) -gt 0 ]]          then                for f in *.T                          do                                  echo "`date` - Renaming $f extension to xml"                                  y=${f%%.*}                                  mv -v -- "$f" "${y}.xml"                                  done  fi    

I dont know why that error is coming up, I realize the file are the same.. thats the whole purpose.. I just want to rename it.

No comments:

Post a Comment