#!/bin/bashdu directory1 > file1.txtdu directory2 >file2.txtfor i inf `cat file1.txt`do if (grep $i file2.txt > /dev/null);then echo 0 > /dev/nullelse echo "文件目录$i在file2.txt中不同或不存在"fidone