Plan 9 from Bell Labs’s /usr/web/sources/contrib/someone/root/rc/bin/updiff

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


#!/bin/rc
# updiff [-bcnrw] file...
rfork e
dflag=(-n)
while(~ $1 -[bcnrw]){
	dflag=($dflag $1)
	shift
}

path = (/bin/)

d = /n/sources/plan9
if(! test -e $d)
	9fs sources

for(i in $*){
#	echo '=====' $i '====='
#	ls -lmd $i
	switch($i){
	case /*
		diff -m $dflag $d/$i $i 
	case *
		i = `{cleanname -d `{pwd} $i}
		diff -m $dflag $d/$i $i
	}
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.