Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/rc/bin/diff3

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
#
#	diff3 wrapper
#
rfork en

switch($1){
case -*
	opts=$1
	shift
}

if (! ~ $#* 3 || ! test -f $1 -a -f $2 -a -f $3 ){
	echo usage: $0 file1 file2 file3 
	exit 'usage'
}

tmp12=/tmp/diff3-12.$pid
tmp23=/tmp/diff3-23.$pid
fn sigexit {
	rm -f $tmp12 $tmp23
}

diff $1 $3 > $tmp12
diff $2 $3 > $tmp23
aux/diff3prog $opts $tmp12 $tmp23 $1 $2 $3

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].