BEGIN{FS=OFS="\t";}{ n=split($4,a,"_"); # print "|"a[1]"|","|"$10"|" if (a[1]==$10) {print $0;} }