File:  [CSRG BSD Unix] / 43BSDReno / contrib / mh / miscellany / tools / CMP
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

: 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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.