#!/bin/bash SIZE=32; echo "Started $1 at `date`:" | tee -a $1.log while [ $SIZE -le 65536 ]; do RSIZE=$SIZE; if [ $RSIZE -gt 65507 ]; then RSIZE=65507 fi ping -c 10 $1 $2 -s $RSIZE > /tmp/$$; LOSS=`grep loss /tmp/$$ |cut -d, -f3` AVG=`grep avg /tmp/$$ |cut -d'/' -f5` echo -e "Size $RSIZE $LOSS, avg=$AVG" | tee -a $1.log; (( SIZE=SIZE*2 )) done rm /tmp/$$ wijziging in head