home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 3.3J / os33j.iso / usr / bin / diff3 < prev    next >
Text File  |  1995-04-15  |  281b  |  19 lines

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