author | goetz |
Thu, 14 Jun 2018 14:32:03 +0200 | |
changeset 50580 | eb0287b637bd |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 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 |
# Loaded Bytes Unloaded Bytes Time |
|
7 |
# 407 436.3 0 0.0 0.36 |
|
8 |
||
9 |
BEGIN { |
|
10 |
headerlines=0; datalines=0; totallines=0 |
|
11 |
} |
|
12 |
||
13 |
/^Loaded Bytes Unloaded Bytes Time $/ { |
|
14 |
headerlines++; |
|
15 |
} |
|
16 |
||
17 |
/^[ ]*[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 { |
|
22562
e909d64b8dd8
6545321: [TESTBUG] jstatLineCounts4.sh has to be resilient to unexpected output
sla
parents:
2
diff
changeset
|
24 |
if ((headerlines == 1) && (datalines == 1)) { |
2 | 25 |
exit 0 |
26 |
} |
|
27 |
else { |
|
28 |
exit 1 |
|
29 |
} |
|
30 |
} |