#!/bin/csh

if ($#argv < 1) then
        printf "Please provide source file.\n\n"
        exit
endif

#"/_SrcAvgCwnd.tr.xgraph"
set plotFiles = ("/_SrcSeqno.tr.xgraph" "/_SrcMaxseq.tr.xgraph" "/_SrcAck.tr.xgraph" "/_SrcCwnd.tr.xgraph" "/_SrcSsthresh.tr.xgraph" "/_SrcRtt.tr.xgraph" "/_SrcSrtt.tr.xgraph" "/_SrcRttvar.tr.xgraph" "/_SrcRto.tr.xgraph" "/_SrcDupacks.tr.xgraph" "/_BS_AckQueueSize.tr.xgraph" "/_BS_Srtt.tr.xgraph" "/_NCWndcuts.tr.xgraph" "/_Nrexmitpack_.tr.xgraph")
while ($#plotFiles > 0)
    set cmdarg = "xgraph "
    foreach arg ($argv)
        set cmdarg = ($cmdarg" "$arg$plotFiles[1])
    end
    shift plotFiles
#    echo $cmdarg
    eval $cmdarg" &"
end
