$1 ~ /proxy/ {proxy=$1} {if ($3 == "KB/s)") { print (substr($2,2,length($2)))*1000 " "proxy} } {if ($3 == "B/s)") {i = 1 l = 0 tl = length($2) while( i < tl ) { if( substr($2,(i + 1),1) == "." ) { i = tl } else { l = i i = i + 1 } } print "000" (substr($2,2,l)) " "proxy } }