0N/A#
0N/ABEGIN {
0N/A totallines=0; matched=0
0N/A }
0N/A
0N/A# match on a main class name
0N/A/^[0-9]+ [a-z|A-Z][a-z|A-Z|0-9|\$|\+]*$/ {
0N/A matched++;
0N/A }
0N/A
0N/A# or match on a path name to a jar file - note, jar files ending with
0N/A# ".jar" is only a convention, not a requirement. Theoretically,
0N/A# any valid file name could occur here.
0N/A/^[0-9]+ .*\.jar$/ {
0N/A matched++;
0N/A}
0N/A
0N/A# or match on the condition that the class name is not available
5778N/A/^[0-9]+ -- .*$/ {
0N/A matched++;
0N/A }
0N/A
5777N/A# or match an empty class name
5777N/A/^[0-9]+ $/ {
5777N/A matched++;
5777N/A }
5777N/A
0N/A { totallines++; print $0 }
0N/A
0N/AEND {
0N/A if ((totallines > 0) && (matched == totallines)) {
0N/A exit 0
0N/A }
0N/A else {
0N/A exit 1
0N/A }
0N/A }