Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/scripts/sdiff

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


#!/bin/rc

fn usage {
	echo 'usage: sdiff file ...' >[1=2]
	exit usage
}

args = ()
while (! ~ $#* 0 && ~ $1 -* && ! ~ $1 --) {
	switch($1) {
	case -*
		args = ($args $1)
		shift
	}
}

if (~ $#* 0) {
	usage
}

9fs sources || exit $status

for (file in $*) {
	if (! ~ $file /*) {
		file=`{pwd}^/$file
	}
	echo --- $file ---
	diff $args /n/sources/plan9^$file $file
}

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].