I have two questions. I am sure one of the Guru will be able to help either one or both.
Find 2nd occurance of pattern= "Bind variable after pattern="ABN USER Admin"
......
ABN USER Admin <--- I know this string
.....
Bind variable
...
..
Bind variable <-- Want to print this string(2nd occurnace)
I have lot of statement with timing information and want to summarize in some brackets. e.g
0 to 10 seconds 10
10 to 20 seconds 12
20 to 50 second 3
e,g
actual data
SQL Statement execution time 0.001 Seconds
SQL Statement execution time 10.12 Seconds
SQL statement execution time 22 Seconds
SQL statement execution time 5.08 Seconds
SQL statement execution time 12 Seconds
SQL statement execution time 19.08 Seconds
SQL statement execution time 20.01 Seconds
output expected
0 to 10 seconds --> 2
10 to 20 seconds -->3
20 to 30 seconds --> 2
Yes, your answer exactly does what is needed. Thank you very much.
For question 1 I need to file 2nd occurance of particular word starting from a particular word in file.
e.g find the second occurance of pattern2 after pattern1