grep by block