148249Sbostic#!/bin/sh - 210881Sshannon# 3*61985Sbostic# Copyright (c) 1991, 1993 4*61985Sbostic# The Regents of the University of California. All rights reserved. 510881Sshannon# 648249Sbostic# %sccs.include.proprietary.sh% 748249Sbostic# 8*61985Sbostic# @(#)diff3.sh 8.1 (Berkeley) 06/06/93 948249Sbostic# 1048249Sbostic 1110881Sshannone= 1210881Sshannoncase $1 in 1310881Sshannon-*) 1410881Sshannon e=$1 1510881Sshannon shift;; 1610881Sshannonesac 1710881Sshannonif test $# = 3 -a -f $1 -a -f $2 -a -f $3 1810881Sshannonthen 1910881Sshannon : 2010881Sshannonelse 2110881Sshannon echo usage: diff3 file1 file2 file3 1>&2 2210881Sshannon exit 2310881Sshannonfi 2410881Sshannontrap "rm -f /tmp/d3[ab]$$" 0 1 2 13 15 2510881Sshannondiff $1 $3 >/tmp/d3a$$ 2610881Sshannondiff $2 $3 >/tmp/d3b$$ 2737873Sbostic/usr/libexec/diff3 $e /tmp/d3[ab]$$ $1 $2 $3 28