#! /bin/bash
# transform packet signal in flow file to gplot format

if [ $1 ]; then
	cut -f $2- $1 |  awk '{ if ( $1 != "packetstats" ) { 
                                  sum = 0; 
                                  n = split($1,A,";");  
				  for (i=1; i <= n; i++) { 
					split (A[i],B,"_"); 
					sum += B[2]; 
					printf "%d\t%f\t%f\n",B[1],B[2],sum;
				  } 
			        }
			      }' > $1_nps.txt
else
	echo "fpsGplt file collumn"
fi
