Confirm file copy in shell script

I have a shell script that has steps to copy files.  How do I confirm that the file copy actually occurred?
jkavxAsked:
Who is Participating?
 
woolmilkporcConnect With a Mentor Commented:
if ! cp source target ; then
 echo "Copy Failed!" ; fi

wmp

0
 
jkavxAuthor Commented:
Thx.  I have a similar problem with an ant task that executes make.  How can I determine if the make fails or not:

    <target name="package">
          <exec dir="pkg" executable="make">
               <arg value="package"/>
         </exec>
    </target>
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.