#!/bin/bash
if [ "$#" -ne 2 ];then
echo "the num is not equal to 2"
exit 1
fi
if [ "$1" == "$2" ]
then
echo "The two files can't be the same."
echo "No copy." >&2
exit 2
fi
if test -d $2
then
echo "Your target is a directory." >&2
echo "No copy." >&2
exit 4
fi
chmod 755 compare.sh
./compare.sh a b