1 # 2 BEGIN { 3 totallines=0; matched=0 4 } 5 6 /^[0-9]+ [a-z|A-Z][a-z|A-Z|0-9|\$|\.]*$/ { 7 matched++; 8 } 9 10 /^[0-9]+ -- .*$/ { 11 matched++; 12 } 13 14 /^[0-9]+ $/ { 15 matched++; 16 } 17 18 { totallines++; print $0 } 19 20 END { 21 if ((totallines > 0) && (matched == totallines)) { 22 exit 0 23 } 24 else { 25 exit 1 26 } 27 }