#!/usr/bin/gawk -We BEGIN { incells=0 } // {incells += 1} /<\/gnm:Cells>/ {incells +=1} incells == 1 && /