PIDFILE=pz2.pid
# Start the gateway.
- ./dbc-opensearch-gw.pl -1 \
+ ../../../dbc-opensearch-gw/dbc-opensearch-gw.pl -1 \
-c dbc-opensearch-gw.cfg \
-l dbc-opensearch-gw.log \
@:9994 &
sed 's/[^0-9 ]//g' |
awk '{print FNR,$0}'> $DF.data
+grep mergeplot show.out > merge.tmp
+LINENUMBER="1"
+LAST=""
+echo "0 0 0" > merge.data
+for lno in `cat merge.tmp | cut -d ' ' -f2`
+do
+ if [ "$lno" != "$LAST" ]
+ then
+ echo "Found line $lno at $LINENUMBER"
+ grep "mergeplot $lno " merge.tmp | sed "s/mergeplot/$LINENUMBER/" >> merge.data
+ LAST=$lno
+ LINENUMBER=$(($LINENUMBER + 1))
+ fi
+done
+echo "$LINENUMBER 0 0 0" >> merge.data
+
echo '\
gnuplot < plot.cmd
+
+echo "
+ set term png
+ set out \"cluster.png\"
+ set title \"$Q\"
+ set yrange [0:20000]
+ plot \"merge.data\" using 1:3 with points title \"records\", \
+ \"merge.data\" using 1:4 with points title \"merged score\", \
+ \"merge.data\" using 1:5 with points title \"sum score\", \
+ \"merge.data\" using 1:6 with points title \"avg score\"
+" > plot.cmd
+cat plot.cmd | gnuplot
+
echo
echo "All done"