Hello I am trying to find a pattern match on some HTML files using AWK but i dont seem to have any luck with it
So for my pattern to match it should have the following
<tr>
<td>Failures</td>
<td>0</td>
</tr>
<tr>
<td>Warnings</td>
<td>4</td>
</tr>
<tr>
<td>Errors</td>
<td>0</td>
</tr>
<tr>
<td>Not Applicable</td>
<td>53</td>
</tr>
<tr>
<td>Manual Checks</td>
<td>9</td>
</tr>
Failures and Manual Checks should be zero. So in the above file failures is 0 and manual check is 9. So i need to match only when failure is 0 and manual check is 0.
SO i tried with and without escaping the new line but awk is not returning any results.
find . -name "*.html" -exec awk '/td\>Failures\<\/td\>\\n.*\<td\>0/ {print FILENAME}' '{}' \;
I have also tried other combinations like below but cant seem to figure out why awk is not going to the next line.
find . -name "*.html" -exec awk '/td\>Failures\<\/td\>\\n\[\^\\\<\]\+\<td\>0/ {print FILENAME}' '{}' \;
Can anyone please have a look and tell me what i am missing?