#!/bin/sh

ttcp=~/media-net/src/apps/ttcp/ttcp
if [ $# = 5 ]; then
  PIDFILE=/tmp/ttcpsend$USER$1
  rm -f $PIDFILE
  $ttcp -s -t -l $3 -n $4 -p $2 -P $1 >> $5 2>&1 &
  echo $! > $PIDFILE
else
  echo "usage: $0 host port packetsize numpackets outfile"
  exit 1
fi
