-
Notifications
You must be signed in to change notification settings - Fork 0
/
watch.sh
63 lines (44 loc) · 1.25 KB
/
watch.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
61
62
63
a1_path=real
a2_path=real
a3_path=real
a4_path=norm
a5_path=norm
a1=$(grep "DOWNLOADED" $a1_path/logs/ic.log | tail -n 1 | cut -f 8)
a2=$(grep "DOWNLOADED" $a2_path/logs/ic.log | tail -n 1 | cut -f 8)
a3=$(grep "DOWNLOADED" $a3_path/logs/ic.log | tail -n 1 | cut -f 8)
a4=$(grep "DOWNLOADED" $a4_path/logs/ic.log | tail -n 1 | cut -f 8)
a5=$(grep "DOWNLOADED" $a5_path/logs/ic.log | tail -n 1 | cut -f 8)
if test $a1 -gt $a2
then
min=$a2;
else
min=$a1;
fi
if test $min -gt $a3
then
min=$a3;
fi
if test $min -gt $a4
then
min=$a4;
fi
if test $min -gt $a5
then
min=$a5;
fi
echo "Downloaded Page $min"
if [ -d $a1_path ]; then
echo "$a1_path HV: $(grep "HV:\W$min\W" $a1_path/logs/ic.log* | cut -f 9)";
fi
if [ -d $a2_path ]; then
echo "$a2_path HV: $(grep "HV:\W$min\W" $a2_path/logs/ic.log* | cut -f 9)";
fi
if [ -d $a3_path ]; then
echo "$a3_path HV: $(grep "HV:\W$min\W" $a3_path/logs/ic.log* | cut -f 9)";
fi
if [ -d $a4_path ]; then
echo "$a4_path HV: $(grep "HV:\W$min\W" $a4_path/logs/ic.log* | cut -f 9)";
fi
if [ -d $a5_path ]; then
echo "$a5_path HV: $(grep "HV:\W$min\W" $a5_path/logs/ic.log* | cut -f 9)";
fi