diff options
author | glenda <glenda@cirno> | 2022-09-13 13:20:23 +0000 |
---|---|---|
committer | glenda <glenda@cirno> | 2022-09-13 13:20:23 +0000 |
commit | 9d2a64a26740982587baab2f5938210bdba9accc (patch) | |
tree | f4802768e4a06b30e60d70cbe6f870f65492823f /APLDemo | |
parent | 92597a2d660285cf32eb0b88ec3d00b4fd48156e (diff) |
Add APLDemo acme script
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 + |