BEGIN { c=1 } $1 == "X" { if (c==1) { mmin=$2; mmax=$3 ;c++ } if ($2mmax) { mmax=$3 } } END { print "X min: " mmin ", max: " mmax }