extract value

Hi

We have having following output. From which we want to get following values using shell script.

1. Thread_Number ==> eg: Thread #: 12 is 12
2. Recovery_Checkpoint ==> eg:     Sequence #: 318 is 318
3. Recovery_RBA ==> eg:      RBA: 58896
4. Recovery_TS ==> eg: Timestamp: 2012-08-16 16:32:39.000000
5. BR_SEQ ==> eg: Sequence #: 318
6. BR_RBA ==> eg:   RBA: 39936
7. BR_TS ==> eg:     SCN: 2959.3465855811 (12712274084675)


We can get Recovery details from Recovery Checkpoint and BR details from   BR Begin Recovery Checkpoint:.

How to get these details using shell script?


Read Checkpoint #12

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 12
    Sequence #: 192
    RBA: 2185232
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558712387 (12709366941251)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb97.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 12
    Sequence #: 318
    RBA: 58896
    Timestamp: 2012-08-16 16:32:39.000000
    SCN: 2959.3466057809 (12712274286673)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb95.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 12
    Sequence #: 318
    RBA: 61440
    Timestamp: 2012-08-16 16:32:39.000000
    SCN: 2959.3466057809 (12712274286673)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb95.log

  BR Previous Recovery Checkpoint:
    Thread #: 12
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 12
    Sequence #: 318
    RBA: 39936
    Timestamp: 2012-08-16 16:31:25.000000
    SCN: 2959.3465855811 (12712274084675)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 12
    Sequence #: 318
    RBA: 39936
    Timestamp: 2012-08-16 16:31:25.000000
    SCN: 2959.3465855811 (12712274084675)
    Redo File:


EXTRACT    EXT01     Last Started 2012-08-16 00:06   Status RUNNING
Checkpoint Lag       00:00:04 (updated 00:00:00 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:40  Thread 1, Seqno 487, RBA 767488
                     SCN 2959.3466057580 (12712274286444)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:41  Thread 6, Seqno 313, RBA 65536
                     SCN 2959.3466057580 (12712274286444)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:42  Thread 11, Seqno 314, RBA 53248
                     SCN 2959.3466057580 (12712274286444)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:39  Thread 2, Seqno 466, RBA 61952
                     SCN 2959.3466057580 (12712274286444)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:41  Thread 4, Seqno 370, RBA 100864
                     SCN 2959.3466057968 (12712274286832)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:41  Thread 5, Seqno 926, RBA 20480
                     SCN 2959.3466057953 (12712274286817)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:40  Thread 8, Seqno 314, RBA 44544
                     SCN 2959.3466057580 (12712274286444)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:30  Thread 3, Seqno 808, RBA 1552282952
                     SCN 2959.3466026027 (12712274254891)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:40  Thread 7, Seqno 352, RBA 52736
                     SCN 2959.3466057580 (12712274286444)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:40  Thread 9, Seqno 315, RBA 33792
                     SCN 2959.3466057580 (12712274286444)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:42  Thread 10, Seqno 314, RBA 43520
                     SCN 2959.3466058270 (12712274287134)
Log Read Checkpoint  Oracle Redo Logs
                     2012-08-16 16:32:39  Thread 12, Seqno 318, RBA 61440
                     SCN 2959.3466057809 (12712274286673)


Current Checkpoint Detail:

Read Checkpoint #1

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 1
    Sequence #: 361
    RBA: 3842576
    Timestamp: 2012-08-15 17:00:57.000000
    SCN: 2959.558696327 (12709366925191)
    Redo File: +DG_DB5GGS_RC_M/oraredo/redo_1b.dbf

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 1
    Sequence #: 487
    RBA: 766992
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/redo_1b.dbf

  Current Checkpoint (position of last record read in the data source):
    Thread #: 1
    Sequence #: 487
    RBA: 767488
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/redo_1b.dbf

  BR Previous Recovery Checkpoint:
    Thread #: 1
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 1
    Sequence #: 487
    RBA: 739840
    Timestamp: 2012-08-16 16:31:28.000000
    SCN: 2959.3465860412 (12712274089276)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 1
    Sequence #: 487
    RBA: 739840
    Timestamp: 2012-08-16 16:31:28.000000
    SCN: 2959.3465860412 (12712274089276)
    Redo File:

Read Checkpoint #2

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 6
    Sequence #: 187
    RBA: 2937360
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558715159 (12709366944023)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb44.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 6
    Sequence #: 313
    RBA: 65040
    Timestamp: 2012-08-16 16:32:41.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb42.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 6
    Sequence #: 313
    RBA: 65536
    Timestamp: 2012-08-16 16:32:41.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb42.log

  BR Previous Recovery Checkpoint:
    Thread #: 6
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 6
    Sequence #: 313
    RBA: 50176
    Timestamp: 2012-08-16 16:31:25.000000
    SCN: 2959.3465856339 (12712274085203)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 6
    Sequence #: 313
    RBA: 50176
    Timestamp: 2012-08-16 16:31:25.000000
    SCN: 2959.3465856339 (12712274085203)
    Redo File:

Read Checkpoint #3

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 11
    Sequence #: 188
    RBA: 2155536
    Timestamp: 2012-08-15 17:01:12.000000
    SCN: 2959.558722115 (12709366950979)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb85.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 11
    Sequence #: 314
    RBA: 52752
    Timestamp: 2012-08-16 16:32:42.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb83.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 11
    Sequence #: 314
    RBA: 53248
    Timestamp: 2012-08-16 16:32:42.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb83.log

  BR Previous Recovery Checkpoint:
    Thread #: 11
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 11
    Sequence #: 314
    RBA: 39936
    Timestamp: 2012-08-16 16:31:24.000000
    SCN: 2959.3465855704 (12712274084568)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 11
    Sequence #: 314
    RBA: 39936
    Timestamp: 2012-08-16 16:31:24.000000
    SCN: 2959.3465855704 (12712274084568)
    Redo File:

Read Checkpoint #4

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 2
    Sequence #: 340
    RBA: 3456016
    Timestamp: 2012-08-15 17:00:08.000000
    SCN: 2959.558565974 (12709366794838)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb13.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 2
    Sequence #: 466
    RBA: 61456
    Timestamp: 2012-08-16 16:32:39.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb11.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 2
    Sequence #: 466
    RBA: 61952
    Timestamp: 2012-08-16 16:32:39.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb11.log

  BR Previous Recovery Checkpoint:
    Thread #: 2
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 2
    Sequence #: 466
    RBA: 43520
    Timestamp: 2012-08-16 16:31:27.000000
    SCN: 2959.3465857950 (12712274086814)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 2
    Sequence #: 466
    RBA: 43520
    Timestamp: 2012-08-16 16:31:27.000000
    SCN: 2959.3465857950 (12712274086814)
    Redo File:

Read Checkpoint #5

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 4
    Sequence #: 245
    RBA: 33808
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558715097 (12709366943961)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb30.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 4
    Sequence #: 370
    RBA: 100368
    Timestamp: 2012-08-16 16:32:41.000000
    SCN: 2959.3466057968 (12712274286832)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb27.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 4
    Sequence #: 370
    RBA: 100864
    Timestamp: 2012-08-16 16:32:41.000000
    SCN: 2959.3466057968 (12712274286832)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb27.log

  BR Previous Recovery Checkpoint:
    Thread #: 4
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 4
    Sequence #: 370
    RBA: 51712
    Timestamp: 2012-08-16 16:31:26.000000
    SCN: 2959.3465857838 (12712274086702)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 4
    Sequence #: 370
    RBA: 51712
    Timestamp: 2012-08-16 16:31:26.000000
    SCN: 2959.3465857838 (12712274086702)
    Redo File:

Read Checkpoint #6

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 5
    Sequence #: 800
    RBA: 3139088
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558715187 (12709366944051)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb41.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 5
    Sequence #: 926
    RBA: 19984
    Timestamp: 2012-08-16 16:32:41.000000
    SCN: 2959.3466057953 (12712274286817)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb39.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 5
    Sequence #: 926
    RBA: 20480
    Timestamp: 2012-08-16 16:32:41.000000
    SCN: 2959.3466057953 (12712274286817)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb39.log

  BR Previous Recovery Checkpoint:
    Thread #: 5
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 5
    Sequence #: 926
    RBA: 12800
    Timestamp: 2012-08-16 16:31:26.000000
    SCN: 2959.3465857714 (12712274086578)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 5
    Sequence #: 926
    RBA: 12800
    Timestamp: 2012-08-16 16:31:26.000000
    SCN: 2959.3465857714 (12712274086578)
    Redo File:

Read Checkpoint #7

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 8
    Sequence #: 188
    RBA: 2875920
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558715183 (12709366944047)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb61.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 8
    Sequence #: 314
    RBA: 44048
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb59.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 8
    Sequence #: 314
    RBA: 44544
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb59.log

  BR Previous Recovery Checkpoint:
    Thread #: 8
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 8
    Sequence #: 314
    RBA: 23040
    Timestamp: 2012-08-16 16:31:23.000000
    SCN: 2959.3465855831 (12712274084695)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 8
    Sequence #: 314
    RBA: 23040
    Timestamp: 2012-08-16 16:31:23.000000
    SCN: 2959.3465855831 (12712274084695)
    Redo File:

Read Checkpoint #8

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 3
    Sequence #: 424
    RBA: 1905603088
    Timestamp: 2012-08-15 16:42:22.000000
    SCN: 2958.2940746352 (12707454007920)
    Redo File: +DG_DB5GGS_AR/oradata/3_424_788700668.dbf

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 3
    Sequence #: 803
    RBA: 2012348944
    Timestamp: 2012-08-16 16:23:54.000000
    SCN: 2959.3464604495 (12712272833359)
    Redo File: Not Available

  Current Checkpoint (position of last record read in the data source):
    Thread #: 3
    Sequence #: 808
    RBA: 1552282952
    Timestamp: 2012-08-16 16:32:30.000000
    SCN: 2959.3466026027 (12712274254891)
    Redo File: Not Available

  BR Previous Recovery Checkpoint:
    Thread #: 3
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 3
    Sequence #: 803
    RBA: 2012348944
    Timestamp: 2012-08-16 16:23:54.000000
    SCN: 2959.3464604495 (12712272833359)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 3
    Sequence #: 808
    RBA: 354321424
    Timestamp: 2012-08-16 16:31:29.000000
    SCN: 2959.3465864764 (12712274093628)
    Redo File:

Read Checkpoint #9

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 7
    Sequence #: 226
    RBA: 2686992
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558715191 (12709366944055)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb51.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 7
    Sequence #: 352
    RBA: 52240
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb57.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 7
    Sequence #: 352
    RBA: 52736
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb57.log

  BR Previous Recovery Checkpoint:
    Thread #: 7
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 7
    Sequence #: 352
    RBA: 39952
    Timestamp: 2012-08-16 16:31:29.000000
    SCN: 2959.3465864660 (12712274093524)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 7
    Sequence #: 352
    RBA: 40976
    Timestamp: 2012-08-16 16:31:29.000000
    SCN: 2959.3465864663 (12712274093527)
    Redo File:

Read Checkpoint #10

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 9
    Sequence #: 189
    RBA: 2075152
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558715178 (12709366944042)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb70.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 9
    Sequence #: 315
    RBA: 33296
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb68.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 9
    Sequence #: 315
    RBA: 33792
    Timestamp: 2012-08-16 16:32:40.000000
    SCN: 2959.3466057580 (12712274286444)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb68.log

  BR Previous Recovery Checkpoint:
    Thread #: 9
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 9
    Sequence #: 315
    RBA: 20480
    Timestamp: 2012-08-16 16:31:22.000000
    SCN: 2959.3465854347 (12712274083211)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 9
    Sequence #: 315
    RBA: 20480
    Timestamp: 2012-08-16 16:31:22.000000
    SCN: 2959.3465854347 (12712274083211)
    Redo File:

Read Checkpoint #11

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 10
    Sequence #: 188
    RBA: 2400784
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558715086 (12709366943950)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb77.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 10
    Sequence #: 314
    RBA: 43024
    Timestamp: 2012-08-16 16:32:42.000000
    SCN: 2959.3466058270 (12712274287134)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb75.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 10
    Sequence #: 314
    RBA: 43520
    Timestamp: 2012-08-16 16:32:42.000000
    SCN: 2959.3466058270 (12712274287134)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb75.log

  BR Previous Recovery Checkpoint:
    Thread #: 10
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 10
    Sequence #: 314
    RBA: 23552
    Timestamp: 2012-08-16 16:31:23.000000
    SCN: 2959.3465856754 (12712274085618)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 10
    Sequence #: 314
    RBA: 23552
    Timestamp: 2012-08-16 16:31:23.000000
    SCN: 2959.3465856754 (12712274085618)
    Redo File:

Read Checkpoint #12

  Oracle Threaded Redo Log

  Startup Checkpoint (starting position in the data source):
    Thread #: 12
    Sequence #: 192
    RBA: 2185232
    Timestamp: 2012-08-15 17:01:06.000000
    SCN: 2959.558712387 (12709366941251)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb97.log

  Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
    Thread #: 12
    Sequence #: 318
    RBA: 58896
    Timestamp: 2012-08-16 16:32:39.000000
    SCN: 2959.3466057809 (12712274286673)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb95.log

  Current Checkpoint (position of last record read in the data source):
    Thread #: 12
    Sequence #: 318
    RBA: 61440
    Timestamp: 2012-08-16 16:32:39.000000
    SCN: 2959.3466057809 (12712274286673)
    Redo File: +DG_DB5GGS_RC_M/oraredo/logb95.log

  BR Previous Recovery Checkpoint:
    Thread #: 12
    Sequence #: 0
    RBA: 0
    Timestamp: 2012-08-16 00:06:25.277527
    SCN: Not available
    Redo File:

  BR Begin Recovery Checkpoint:
    Thread #: 12
    Sequence #: 318
    RBA: 39936
    Timestamp: 2012-08-16 16:31:25.000000
    SCN: 2959.3465855811 (12712274084675)
    Redo File:

  BR End Recovery Checkpoint:
    Thread #: 12
    Sequence #: 318
    RBA: 39936
    Timestamp: 2012-08-16 16:31:25.000000
    SCN: 2959.3465855811 (12712274084675)
    Redo File:

Write Checkpoint #1

  GGS Log Trail

  Current Checkpoint (current write position):
    Sequence #: 7745
    RBA: 4101554
    Timestamp: 2012-08-16 16:32:46.588671
    Extract Trail: /apps/gg/DB5GGS/trail/aa

CSN state information:
  CRC: A2-D-62-3D
  CSN: Not available

Header:
  Version = 2
  Record Source = A
  Type = 11
  # Input Checkpoints = 12
  # Output Checkpoints = 1

File Information:
  Block Size = 2048
  Max Blocks = 100
  Record Length = 12288
  Current Offset = 0

Configuration:
  Data Source = 3
  Transaction Integrity = 1
  Task Type = 0

Status:
  Start Time = 2012-08-16 00:06:45
  Last Update Time = 2012-08-16 16:32:46
  Stop Status = A
  Last Result = 0

Open in new window

basiranaAsked:
Who is Participating?
 
Garry GlendownConnect With a Mentor Consulting and Network/Security SpecialistCommented:
OK, here's a quick hack that looks like it's working halfways - may need some checking whether actually the fields you need are picked, but should be a good starting point ...

cat inputfile | awk '
BEGIN {MODE=0; Thread_Number=0; Recovery_Checkpoint=""; Recovery_RBA=""; Recovery_TS=""; BR_SEQ=""; BR_RBA=""; BR_TS="";}
END {
        if (Thread_Number>0 && MODE>0) {
        print Thread_Number " " Recovery_Checkpoint " " Recovery_RBA " " Recovery_TS " " BR_SEQ " " BR_RBA " " BR_TS;
        }
}
/^  Recovery Checkpoint .position/      { MODE=1;
                        Thread_Number="";Recovery_Checkpoint="";Recovery_RBA="";Recovery_TS=""; BR_SEQ="";BR_RBA="";BR_TS="";
                         }
/BR Begin Recovery Checkpoint:/ { MODE=2; }
/Thread #:/  { /*if (MODE==1) { */
                Thread_Number=$3;
        /* } */
        }
/Sequence #:/   { if (MODE==1) { Recovery_Checkpoint=$3; }
                else if (MODE==2) {BR_SEQ=$3; } }
/RBA:/          { if (MODE==1) { Recovery_RBA=$2; }
                else if (MODE==2) {BR_RBA=$2; } }
/Timestamp:/    { if (MODE==1) { Recovery_TS=$2 " " $3; MODE=3;}
                else if (MODE==2) {BR_TS=$2 " " $3;
                        if (Thread_Number>0) {
                        print Thread_Number " " Recovery_Checkpoint " " Recovery_RBA " " Recovery_TS " " BR_SEQ " " BR_RBA " " BR_TS;
                        MODE=0;
                        }
                } }
'

Open in new window

0
 
Garry GlendownConsulting and Network/Security SpecialistCommented:
Should be easy to parse with an AWK script ... not exactly sure as for the output, and whether any grouping (and which) of the values should occur
0
 
basiranaAuthor Commented:
The output is  all 7 values in single lines as below and group by thread number.

echo $Thread_Number  $Recovery_Checkpoint $Recovery_RBA $Recovery_TS $BR_SEQ $BR_RBA $BR_TS
0
 
basiranaAuthor Commented:
Thanks for your help it is working. Can you help me understand how the parsing is happening. the flow of the process.
0
 
basiranaAuthor Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.