Mv : cannot stat :no such file or directory

this is my script

x=1
o=0
while [ $o -eq 0 ]
       do
         fi [[ -e /var/log/vieux-logs/mrnet.log.$x.gz ]];then     (this check is a certain extension with a number exist)
            let x++
             else
         mv /var/log/mrnet.log.1.gz /var/log/mrnet.log.$x.gz
    o=1
           fi
       done

mrnet.log.1.gz exist already
thanks in advance

  • fi [[ ?
  • (this check is a certain extension with a number exist) is not a comment