The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 11-06-2008
cbo0485 cbo0485 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 87
Script:

Code:
diff archive.tar backup.tar > tmp
if [ -s tmp ]; then
/tmp/abcQATest/abcMoveTest.sh archive.tar /tmp/archive.tar
echo "Files different, transferring files"
else
echo "Files the same, exiting";
fi
Results:

Code:
/tmp/abcQATest>./autoMoveScript.sh
Binary files archive.tar and backup.tar differ
Files the same, exiting
/tmp/abcQATest>
The binary files do differ, but then for some reason it always goes to the second part of the if statement.

Last edited by cbo0485; 11-06-2008 at 05:17 PM..