#!/bin/rc
rfork n
rm -f /srv/a /srv/b
k=''
if(~ $1 -k){
k=sns/k
shift
}
if(~ $#* 0){
echo usage: xtest [-k] cmd >[1=2]
exit usage
}
@{rfork n; srvfs -df /tmp/a a /}
mount /srv/a /n/a
@{rfork n; $k^srvfs -df /tmp/b b /}
mount /srv/b /n/b
@{rfork n; bind /n/b/n/a /; $* >/dev/null}
grep -c '^([0-9:.]+ )?T' /tmp/[ab]
rm -f /srv/[ab]
|