#!/bin/rc # receives and sends messages in a routing hypercube if(~ $#1 1) mynum=$1 if(~ $#mynum 0) mynum=00 if(~ $#dimension 0) dimension=2 while(msg=`{read}){ dest=$msg(1) if(~ $dest $mynum){ echo $dest `{date} >>/tmp/cubelog echo $msg(2-) |rc >>/tmp/cubelog } if not{ route=`{hyper -pno -d $dimension -f $mynum -t $dest} echo $msg >>/n/cube/$route } }