CWD=`pwd`
DIR1=/usr/src/uts/ns32000
DIR2=/usr/src/uts/nsws
>${CWD}/PATH1
echo > ${CWD}/Y
echo "This will be a listing of files that exist only in ${DIR1}" >> ${CWD}/Y
echo >> ${CWD}/Y
cd ${DIR1}
find . -type f -print | sort > ${CWD}/DIF1
for file in `cat ${CWD}/DIF1`
	do
		filetmp=`echo $file | sed '{s/\.adm\/db16000a/\.adm\/u3b2/
}'` > /dev/null
		if test -f ${DIR2}/$filetmp
			then	
			cp ${DIR1}/$file ${CWD}/DIFSTORE
		        echo $filetmp >> ${CWD}/PATH1
			cmp -s ${CWD}/DIFSTORE ${DIR2}/$filetmp
			if [ $? -eq 0 ]
				then 
					echo "======================================== ${DIR1}$file vs. ${DIR2}$filetmp ================="
				else
					echo "======================================== ${DIR1}$file vs. ${DIR2}$filetmp ================="
					sdiff -w170 -s ${CWD}/DIFSTORE ${DIR2}/$filetmp
			fi
		    else
			echo $file >> ${CWD}/Y
		    fi
	done

cat ${CWD}/Y
cd ${DIR2}
find . -type f -print | sort > ${CWD}/PATH2
echo
echo "This will be a listing of files that exist only in ${DIR2}"
echo
cat ${CWD}/PATH1 ${CWD}/PATH2 > ${CWD}/X
sort ${CWD}/X | uniq -u 

rm ${CWD}/DIF* ${CWD}/X
