4601N/A#
4601N/ABEGIN {
4601N/A totallines=0; matched=0
4601N/A }
4601N/A
4601N/A# match on counter name followed '=' and an arbitrary value
4601N/A/^[a-z|A-Z][a-z|A-Z|0-9|\.|_]*=.*$/ {
4601N/A matched++;
4601N/A }
4601N/A
4601N/A# or match the first line (PID of the JVM followed by ':')
4601N/A/^[0-9]+:/ {
4601N/A matched++;
4601N/A }
4601N/A
4601N/A { totallines++; print $0 }
4601N/A
4601N/AEND {
4601N/A if ((totallines > 0) && (matched == totallines)) {
4601N/A exit 0
4601N/A }
4601N/A else {
4601N/A exit 1
4601N/A }
4601N/A}