1 #
2 # matching the following output specified as a pattern that verifies
3 # that the numerical values conform to a specific pattern, rather than
4 # specific values.
5 #
6 # MCMN MCMX MC YGC FGC FGCT GCT
7 # 8192.0 65536.0 8192.0 8192.0 1 0 0.000 0.029
8
9 BEGIN {
10 headerlines=0; datalines=0; totallines=0
11 }
12
13 /^ MCMN MCMX MC YGC FGC FGCT GCT $/ {
14 headerlines++;
15 }
16
17 /^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ {
18 datalines++;
19 }
20
21 { totallines++; print $0 }
22
23 END {
24 if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
25 exit 0
26 }
27 else {
28 exit 1
29 }
30 }
|
1 #
2 # matching the following output specified as a pattern that verifies
3 # that the numerical values conform to a specific pattern, rather than
4 # specific values.
5 #
6 # MCMN MCMX MC CCSMN CCSMX CCSC YGC FGC FGCT GCT
7 # 512.0 132096.0 5120.0 512.0 131072.0 512.0 1 0 0.000 0.004
8
9 BEGIN {
10 headerlines=0; datalines=0; totallines=0
11 }
12
13 /^ MCMN MCMX MC CCSMN CCSMX CCSC YGC FGC FGCT GCT $/ {
14 headerlines++;
15 }
16
17 /^[ ]*[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]+$/ {
18 datalines++;
19 }
20
21 { totallines++; print $0 }
22
23 END {
24 if ((headerlines == 1) && (datalines == 1) && (totallines == 2)) {
25 exit 0
26 }
27 else {
28 exit 1
29 }
30 }
|