Stephen Reese

#/bin/bash
DIR_1=$1
DIR_2=$2

#check dir diffs

ls -1 $DIR_1 >/tmp/diff.1
ls -1 $DIR_2 >/tmp/diff.2

echo "Check Dir differences:"
diff /tmp/diff.1 /tmp/diff.2 && echo "Dir's have the same files"

#check files differences

echo "check files differences:"
for file in `cat /tmp/diff.1 /tmp/diff.2|uniq`; do
diff $DIR_1/$file $DIR_2/$file 2>/dev/null
done

rm /tmp/diff.1 /tmp/diff.2

Comments

comments powered by Disqus