#!/bin/sh
perl throughput.pl out_dccp.tr 4 tcp 1 | tee flow1_tcp.txt && perl throughput.pl out_dccp.tr 5 DCCP_Data 1 | tee flow2_dccp.txt

if [ X$1 == "X10" ] ; then
	echo 'set yrange [0:12000]' > curves.gp
else
	echo 'set yrange [0:1200]' > curves.gp
fi
echo 'set output "DCCP_CCID'$2'_TCP_'$3'_'$1'Mbit.png"' >> curves.gp
echo 'plot "flow1_tcp.txt" using :($2*1000) title "TCP '$3'" with lines ls 1' >> curves.gp
echo 'replot "flow2_dccp.txt" using :($2*1000) title "DCCP/CCID'$2'" with lines ls 2' >> curves.gp
echo '' >> curves.gp
gnuplot graph.gp

