#! /usr/bin/perl $size = $ARGV[0]; while(<STDIN>) { if(/round-trip min\/avg\/max = [0-9.]+\/([0-9.]+)\/[0-9.]+ ms/) { $rtt = $1; printf "%d %f\n", $size, ($size / 1024) / ($rtt / 1000); } }