gawk -v contains="$backup" ' NR==1 { a=$0; while (a) { l=match(a, "( [A-Z]|$)"); flen=(flen l " "); n=substr(a, 1, l); sub(" +$", "", n); field[n]=++fn; a=substr(a, l+1); } FIELDWIDTHS=flen; } NR>1 { for (i=1; i<=NF; i++) { sub(" *$", "", $i); } } NR>1 && $field["Created-From-Volume"] && $field["Volume-Name"]~$contains { print $field["Volume-Name"] } '