Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/refer/pubindex.rc

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


#!/bin/rc
# york; BTL pubindex not distributed
rfork e
_L=refer
~ TMPDIR () '' || TMPDIR=/tmp
T=$TMPDIR/pb$pid
ret=()
h=-h997
n=()
mkey=$_L/mkey
inv=$_L/inv
fn sigexit { rm -f $T.* }
for (a) {
	switch ($a) {
	case -h*
		h=$a
	case -n*
		n=$a
	case *
		switch ($#*) {
		case 1
		case *
			echo $a:
		}
		if ($mkey $n $a | $inv -v $h -n $T) {
			mv $T.ia $a.ia
			mv $T.ib $a.ib
			mv $T.ic $a.ic
		}
		ret=($ret $status)
	}
}
exit $ret

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.