blob: fbf85b5d3806f399f354e8425f73838f58c532d5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
|