view miscellany/tools/CMP @ 17:76d91e545ea8 default tip

addrsbr and dtimep fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 24 Nov 2014 14:49:25 +0900
parents bce86c4163a3
children
line wrap: on
line source

: run this through /bin/sh

case $# in
    2)	;;
    *)	echo "usage: CMP dir1 dir2" 1>&2; exit 1 ;;
esac

for A in `hier -a echo $2 | sed -e s%$2%%`
do
    if [ ! -d $1$A ];
    then
	if [ -f $1$A ];
	then
	    if cmp -s $2$A $1$A;
	    then
		true
	    else
		echo $1$A: different
	    fi
	else
	    echo $1$A: non-existent
	fi
    fi
done