diff --git a/scripts/s/sh b/scripts/s/sh index 4490967..3fedc93 100755 --- a/scripts/s/sh +++ b/scripts/s/sh @@ -277,7 +277,20 @@ done; exit 1'} cat $S/statewait >/dev/null >[2]/dev/null while(! is_idle) { - cat $S/chatwait + n=`{wc -c < $S/chat >[2]/dev/null} + if(~ $#n 0) n=0 + if(test $n -gt $chat_off) { + tail -c +`{expr $chat_off + 1} $S/chat + chat_off=$n + } + sleep 0.05 + } + + n=`{wc -c < $S/chat >[2]/dev/null} + if(~ $#n 0) n=0 + if(test $n -gt $chat_off) { + tail -c +`{expr $chat_off + 1} $S/chat + chat_off=$n } printf '\n' }