Research V7 development
[unix-history] / bin / diff3
CommitLineData
cbbd3f84
KT
1e=
2case $1 in
3-*)
4 e=$1
5 shift;;
6esac
7if test $# = 3 -a -f $1 -a -f $2 -a -f $3
8then
9 :
10else
11 echo usage: diff3 file1 file2 file3 1>&2
12 exit
13fi
14trap "rm -f /tmp/d3[ab]$$" 0 1 2 13 15
15diff $1 $3 >/tmp/d3a$$
16diff $2 $3 >/tmp/d3b$$
17/usr/lib/diff3 $e /tmp/d3[ab]$$ $1 $2 $3