#!/bin/sh
perl throughput.pl out_tfrc.tr 4 tcp 1 | tee flow1_tcp.txt && perl throughput.pl out_tfrc.tr 5 tcpFriend 1 | tee flow2_tfrc.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 "TFRC_TCP_'$2'_'$1'Mbit.png"' >> curves.gp
echo 'plot "flow1_tcp.txt" using :($2*1000) title "TCP '$2'" with lines ls 1' >> curves.gp
echo 'replot "flow2_tfrc.txt" using :($2*1000) title "TFRC" with lines ls 2' >> curves.gp
echo '' >> curves.gp
gnuplot graph.gp

