-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogress_on_web.sh
executable file
·61 lines (51 loc) · 1.25 KB
/
progress_on_web.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# azt mutatja, hogy az egeys elemzésekben hány fájl van készen
# ennyi másodpercenként frissít
INTERVAL=10
# dict: RUN_ID -> ennyi fájlt kell lefuttatnia
declare -A runs=(
["K00001"]=9000
["K09001"]=6000
["K15001"]=4000
["K19001"]=2700
["K21701"]=1800
["K23501"]=1200
["K24701"]=800
["K25501"]=500
["K26001"]=350
["K26351"]=200
["K26551"]=120
["K26671"]=70
["K26741"]=40
["K26781"]=23
["K26804"]=12
["K26816"]=6
)
ORDER="K00001 K09001 K15001 K19001 K21701 K23501 K24701 K25501 K26001 K26351 K26551 K26671 K26741 K26781 K26804 K26816"
while true
do
(
echo "<html><head><meta http-equiv='refresh' content='$INTERVAL'></head><body>"
echo "start:"
echo "Mon Jan 27 16:30:00 CET 2020"
echo "<br/>"
echo ".now:"
date
echo '<br/><br/><table>'
for i in $ORDER
do
n=`cat out.investigate.$i | grep "sh iate_eurovoc.sh" | wc -l`
s=${runs[$i]}
p=`expr $n \* 10000 / $s | sed "s/\(.*\)\(..\)/\1,\2/"`
echo '<tr>'
echo "<td>$i</td>"
echo "<td align='right'>$n /</td>"
echo "<td align='right'>$s =</td>"
echo "<td align='right'>$p%</td>"
echo '<tr/>'
done
echo "</table></body></html>"
) > K.html
scpc K.html
sleep $INTERVAL
done