#!/bin/rc rfork e chat = /n/gridchat/chat if(! test -f $chat){ echo $chat does not exist >[1=2] exit 'no chat file' } label gridchat cat $chat & fn sighup sigint sigterm{ @{echo kill >/proc/$apid/note} & } while(msg = `''{read}){ echo -n $msg | tr -c '' \x08 if(! ~ $msg $nl) echo -n $user → $msg >>$chat }