go to / skip in script

Hi all
I have some script like this

#!/bin/bash
mv /tmp/file1 tmp/file2
if [[ $? -eq 0 ]] ; then
  cp /tmp/filetest/ tmp/file3
     if [[ $? -eq 0 ]] then 
      echo "succes"
    else 
      echo "failed"
    fi
else   
 echo "failed"
fi

i didn't try to see if it's work, the thing is that i don't care if it's failed in phase one or two, is there any way to short this written without all this echo
somethis like this

#!/bin/bash
mv /tmp/file1 tmp/file2
if [[ $? -eq 0 ]] ; then
  cp /tmp/filetest/ tmp/file3
     if [[ $? -eq 0 ]] then 
      echo "succes"
    else 
     go to fail
    fi
else   
 go to fail
fi

fail.
echo "script failed" 
.

or any other way to short this complex script.

thank you very much
best regards

if mv /tmp/file1 tmp/file2 && cp /tmp/filetest/ tmp/file3; then
  echo success
else
  echo failed
fi

Hi
thanks for the response,
According to the syntax if the first command failed
mv /tmp/file1 tmp/file2
it continue to the second command :/tmp/filetest/ tmp/file3.
this is not what i wanted, i need that if the first command, failed ,
it won't continue to the second.
any other idea ?
Best regards.

That's what you want... that's what you got :wink:
Learn the difference between && and ||

Like sanmero says this is exactly how && works... Because of efficiency the right side only gets evaluated if the left side is true. If the left side is false it does not matter what value the right side evaluates to, so it never gets evaluated.

S.