#!/bin/rc
rfork e
if (~ $snipserv '')
snipserv=9srv.net
srv -cnmq tcp!$snipserv!17037 $snipserv^!snip /n/$snipserv^!snip || {
echo 'can''t mount snippet service' >[1=2]
exit mountsnip
}
target=/n/$snipserv^!snip/$user.$pid
switch($#*){
case 0
ls /n/$snipserv^!snip
case 1
cp $1 $target && echo $target || echo error: $status
case *
for (i in $*)
snip $i
}
|