判断两个文件是否相同
2020-04-11 本文已影响0人
大白菜的猪猪
#/bin/bash
file1=/mnt/mmc/test/aa
file2=/mnt/mmc/test/bb
diff $file1 $file2 > /dev/null
if [ $? == 0 ]; then
echo "Both file are same"
else
echo "Both file are different"
fi
#/bin/bash
file1=/mnt/mmc/test/aa
file2=/mnt/mmc/test/bb
diff $file1 $file2 > /dev/null
if [ $? == 0 ]; then
echo "Both file are same"
else
echo "Both file are different"
fi