lineCounts4.awk 1.7 KB
Newer Older
D
duke 已提交
1 2 3 4 5
#
# matching the following output specified as a pattern that verifies
# that the numerical values conform to a specific pattern, rather than
# specific values.
#
6
#  S0     S1     E      O      M     YGC     YGCT    FGC    FGCT     GCT   
D
duke 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#  0.00  99.99  66.81   1.24  26.55      1    0.028     0    0.000    0.028
#  0.00  99.99  68.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  70.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  70.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  70.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  72.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  72.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  74.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  74.81   1.24  27.84      1    0.028     0    0.000    0.028
#  0.00  99.99  76.81   1.24  27.85      1    0.028     0    0.000    0.028
#  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   
#  0.00  99.99  76.81   1.24  27.85      1    0.028     0    0.000    0.028

BEGIN	{
	    headerlines=0; datalines=0; totallines=0
	    datalines2=0;
        }

25
/^  S0     S1     E      O      M     YGC     YGCT    FGC    FGCT     GCT   $/	{
D
duke 已提交
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
	    headerlines++;
	}

/^[ ]*[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]+$/	{
	    if (headerlines == 2) {
	        datalines2++;
	    }
	    datalines++;
	}

	{ totallines++; print $0 }

END	{ 
	    if ((headerlines == 2) && (datalines == 11) && (totallines == 13) && (datalines2 == 1)) {
	        exit 0
	    } else {
	        exit 1
	    }
	}