lineCounts4.awk revision 8180:b606775fd1a3
172574Skeith# 272574Skeith# matching the following output specified as a pattern that verifies 372574Skeith# that the numerical values conform to a specific pattern, rather than 472574Skeith# specific values. 572574Skeith# 672574Skeith# S0 S1 E O M CCS YGC YGCT FGC FGCT GCT 772574Skeith# 0.00 96.88 66.55 2.34 77.78 68.02 1 0.003 0 0.000 0.003 872574Skeith# 0.00 96.88 71.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 972574Skeith# 0.00 96.88 73.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 1072574Skeith# 0.00 96.88 73.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 1172574Skeith# 0.00 96.88 73.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 1272574Skeith# 0.00 96.88 75.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 1372574Skeith# 0.00 96.88 75.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 1472574Skeith# 0.00 96.88 77.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 15# 0.00 96.88 77.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 16# 0.00 96.88 77.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 17# S0 S1 E O M CCS YGC YGCT FGC FGCT GCT 18# 0.00 96.88 79.58 2.34 77.78 68.02 1 0.003 0 0.000 0.003 19 20BEGIN { 21 headerlines=0; datalines=0; totallines=0 22 datalines2=0; 23 } 24 25/^ S0 S1 E O M CCS YGC YGCT FGC FGCT GCT $/ { 26 headerlines++; 27 } 28 29/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { 30 if (headerlines == 2) { 31 datalines2++; 32 } 33 datalines++; 34 } 35 36 { totallines++; print $0 } 37 38END { 39 if ((headerlines == 2) && (datalines == 11) && (totallines == 13) && (datalines2 == 1)) { 40 exit 0 41 } else { 42 exit 1 43 } 44 } 45