gawk 'BEGIN{FS="\\&"} /%/ {next} {sub(/\\hline/,"")} /(W|SEESAW)/ { sub(/\\\\/," ") print $4 " \& " 100*int(($4-$3)/$3) "\\\\" } #{print} ' average-reductions.tex