Seamus Carr wrote:
>
> I'm trying to count first occurrence of a pattern in a block of lines
> which have the same number in first field. I was using if statements to
> test the conditions. The problem is that it reads the pattern of every
> line, not skipping rest of the block if the pattern ha
Hi Seamus
Seamus Carr wrote:
> I'm trying to count first occurrence of a pattern in a block of lines
> which have the same number in first field.
'Count the first occurrence'? That would be '1' ;-)
> I was using if statements
> to test the conditions. The problem is that it reads the pattern of
I'm trying to count first occurrence of a pattern in a block of lines
which have the same number in first field. I was using if statements to
test the conditions. The problem is that it reads the pattern of every
line, not skipping rest of the block if the pattern has been matched.
Putting th