【发布时间】:2013-09-25 11:13:57
【问题描述】:
我有一个 unix 脚本,它将为两个文件创建 md5sum,然后检查这两个文件是否匹配。这是脚本的一个示例 - 但这没有正确比较文件 - 任何人都可以对此有所了解吗?
md5sum version1.txt >> file1
md5sum version2.txt >> file2
if [ $file1 == $file2 ]
then
echo "Files have the same content"
else
echo "Files have NOT the same content"
fi
【问题讨论】:
标签: unix if-statement scripting