diff options
Diffstat (limited to 'APLDemo')
-rwxr-xr-x | APLDemo | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ +#!/bin/rc + +winid=`{grep -e '-apl' /mnt/acme/index | awk '{print $1}' } +if(~ $#winid 0){ + win apl & + exit +} + +state=/tmp/apldemo.$winid.state +if (test -e $state) + current=`{cat $state} +if not + current=1 + +next=`{echo $current + 1 | hoc} +echo $next > $state + +cat $1 | awk 'NR=='$current > /mnt/acme/$winid/body + |