Some lines occur before the "Total free space" line and some after. And I don't intend to use the data as input to something else.
This report is broken down into several sections separated by the following line:
______________________________________
The only sections I'm interested in are those with:
Node Type = Leaf Node / Large RID and
Node Type = Last Leaf Node / Large RID
From each section, I'd like to extract the following info:
Index Object page
Node Type
Total Free Space
Value = <lowest key value>
Value = <highest key value>
The value range is the difficult part, I think, because I'm only interested in the lowest and highest value stored on each 'Index Object page'.
Executing -> cat TEST.RPT | egrep "Index Object page|Node Type|Total Free Space|Value"
gives me what I need except it dispays some info I prefer not to see such as:
- I don't need to see this info because 'Node Type = Root/Leaf Node' or 'Node Type = Root Node / Large RID':
---------------------------
Index Object page: 0
Index Object page: 1
Node Type = Root/Leaf Node
Total Free Space = 3289
Value = 0
Value = 1
Index Object page: 2
Node Type = Root Node / Large RID
Total Free Space = 2513
Value = 181
Value = 368
Value = 555
...
Value = 9905
-----------------------------
- Instead of seeing this:
----------------------------
Index Object page: 3
Node Type = Leaf Node / Large RID
Total Free Space = 966
Value = 1
Value = 2
Value = 3
.... skipped some values
Value = 181
----------------------------
I prefer to see (just the range of values - low and high):
----------------------------
Index Object page: 3
Node Type = Leaf Node / Large RID
Total Free Space = 966
Value = 1
Value = 181
----------------------------
The same goes for all sections with 'Node Type = Leaf Node / Large RID' and 'Node Type = Last Leaf Node / Large RID' where 'Total Free Space' != 0
Please don't spend too much time on it. My customer asked me if I can help him write a script to extract this info and this is not really my job to do it.
Thanks