Skip to content

Commit 0511074

Browse files
committed
report example
1 parent 0794dc3 commit 0511074

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

files/report.dat

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
snaps1: Counter: 4966
2+
Opens: Counter: 357283
3+
4+
Instance: s.1.aps.userDatabase.mount275668.attributes
5+
6+
snaps1: Counter: 0
7+
Opens: Counter: 357283
8+
9+
Instance: s.1.aps.userDatabase.test.attributes
10+
11+
snaps1: Counter: 5660
12+
Opens: Counter: 37283
13+
14+
Instance: s.1.aps.userDatabase.mount275000.attributes

report.awk

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Complex reporting
2+
# Example: awk -f report.awk files/report.dat
3+
#
4+
# Create a report to visualize snaps and instance but only when snap first counter tag is greater than zero.
5+
6+
{
7+
$1=$1
8+
}
9+
/snaps1/ && $NF>0{print;f=1}
10+
f && /Instance/ {print;f=0}

0 commit comments

Comments
 (0)