hi, i have a large text file that I just want to extract the important
information from. It will be a random number of lines but between two specific
line numbers/markers.
I was thinking I could get the line number for the first marker:
Tablespace Percent Total Free
Then get the line number for the second marker:
Tablespace Free Space Avg Fragmentation
Now all I would need to do is print out the text between the two lines
(including the 1st marker but not the second):
print 1st_marker_line# --> 2nd_marker_line#
I am pretty sure I can do this with awk but not sure how.
Thanks for your help!
Sample text:
PHP Code:
09/25/06 SPCCHK - Tablespace Percent Total Free Values on SWB
%chg Days
Tablespace Today since till
Name 09/18 09/19 09/20 09/21 09/22 09/23 09/24 09/25 yest zero
----------------- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
BDR_DATA 89.5 89.5 89.4 89.4 89.4 89.3 89.3 89.1 -.2
SYSAUX 71.0 70.5 70.0 71.5 71.1 70.6 70.0 71.4 1.4
SYSTEM 22.7 22.7 22.7 22.7 22.7 22.6 22.2 22.2 .0 297
UNDOTBS1 21.8 21.8 22.5 31.0 30.8 29.8 29.9 30.9 1.0
09/25/06 SPCCHK - Tablespace Free Space Avg Fragmentation Pct on SWB
Fragmentation Pct is calculated by dividing the number of data files for a
tablespace by the number of different chunks of free space within those
data files. The lower the number, the more fragmented your free space is.
%chg
Tablespace Today since
Name 09/18 09/19 09/20 09/21 09/22 09/23 09/24 09/25 yest
----------------- ----- ----- ----- ----- ----- ----- ----- ----- -----
SYSAUX 16.7 20.0 16.7 .5 .6 .8 2.3 1.0 -1.3
UNDOTBS1 .3 .3 .3 .2 .2 .2 .3 .3 .0
etc. etc. etc.
this is all I want printed out (or sent to to a file or whatever):
PHP Code:
09/25/06 SPCCHK - Tablespace Percent Total Free Values on SWB
%chg Days
Tablespace Today since till
Name 09/18 09/19 09/20 09/21 09/22 09/23 09/24 09/25 yest zero
----------------- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
BDR_DATA 89.5 89.5 89.4 89.4 89.4 89.3 89.3 89.1 -.2
SYSAUX 71.0 70.5 70.0 71.5 71.1 70.6 70.0 71.4 1.4
SYSTEM 22.7 22.7 22.7 22.7 22.7 22.6 22.2 22.2 .0 297
UNDOTBS1 21.8 21.8 22.5 31.0 30.8 29.8 29.9 30.9 1.0