#!/bin/bash

function die {
   echo "stop graphics"
   pkill tail
   pkill awk
   pkill qpq3x
   pkill gnuplot
   exit
}

trap die INT TERM EXIT

if [ $1 ]; then
   touch ~/test_data/results/$1
   tail -f ~/test_data/results/$1 | ~/tranalyzer2/trunk/scripts/gpq3x | gnuplot -p
else
      echo "gpqsgplot centralityfile"
fi
