1 #!/bin/bash
 2 
 3 ARGS=2  # Two args to script expected.
 4 
 5 if [ $# -ne "$ARGS" ]
 6 then
 7   echo "Usage: `basename $0` file1 file2"
 8   exit 65
 9 fi
10 
11 
12 cmp $1 $2 > /dev/null 
15 
16 if [ $? -eq 0 ]  # Test exit status of "cmp" command.
17 then
18   echo "File \"$1\" is identical to file \"$2\"."
19 else  
20   echo "File \"$1\" differs from file \"$2\"."
21 fi
22 
23 exit 0