From following file:
1 PARSING IN CURSOR #140499 dep=0 tim=4217919222030 sqlid='ftf4q8xj38z7k'
2 WAIT #1404991: nam='SQL*Net message' ela= 1 tim=4217919224736
3 WAIT #1404991: nam='SQL*Net message' ela= 655 tim=4217919225409
4 PARSING IN CURSOR #140499 dep=0 tim=4217919225606 sqlid='9fufagwmu041b'
5 WAIT #1404991: nam='redo log sync' ela= 1 tim=4217919225677
6 WAIT #1404991: nam='redo log sync' ela= 736 tim=4217919226432
7 PARSING IN CURSOR #140499 dep=0 tim=4217919226577 sqlid='bzdm0nbr7c036'
8 WAIT #1404990: nam='SQL*Net message' ela= 1 tim=4217919226665
9 WAIT #1404990: nam='SQL*Net message' ela= 2027 tim=4217919228710
10 WAIT #1404991: nam='SQL*Net message' ela= 1 tim=4217919228849
11 PARSING IN CURSOR #140499 dep=1 tim=4217919225606 sqlid='9fufagwmu041b'
12 WAIT #1404991: nam='PGA memory operation' ela= 603 tim=4217919229470
13 WAIT #1404991: nam='PGA memory operation' ela= 1 tim=4217919229647
14 WAIT #1404991: nam='PGA memory operation' ela= 521 tim=4217919230185
I want to display everything, but for strings inside a line non-matching SQL*Net message
between nam='
and ' ela=
, I want these strings to be replaced with Other DB operation
(and keep nam='
and ' ela=
before and after these strings):
1 PARSING IN CURSOR #140499 dep=0 tim=4217919222030 sqlid='ftf4q8xj38z7k'
2 WAIT #1404991: nam='SQL*Net message' ela= 1 tim=4217919224736
3 WAIT #1404991: nam='SQL*Net message' ela= 655 tim=4217919225409
4 PARSING IN CURSOR #140499 dep=0 tim=4217919225606 sqlid='9fufagwmu041b'
5 WAIT #1404991: nam='Other DB operation' ela= 1 tim=4217919225677
6 WAIT #1404991: nam='Other DB operation' ela= 736 tim=4217919226432
7 PARSING IN CURSOR #140499 dep=0 tim=4217919226577 sqlid='bzdm0nbr7c036'
8 WAIT #1404990: nam='SQL*Net message' ela= 1 tim=4217919226665
9 WAIT #1404990: nam='SQL*Net message' ela= 2027 tim=4217919228710
10 WAIT #1404991: nam='SQL*Net message' ela= 1 tim=4217919228849
11 PARSING IN CURSOR #140499 dep=1 tim=4217919225606 sqlid='9fufagwmu041b'
12 WAIT #1404991: nam='Other DB operation' ela= 603 tim=4217919229470
13 WAIT #1404991: nam='Other DB operation' ela= 1 tim=4217919229647
14 WAIT #1404991: nam='Other DB operation' ela= 521 tim=4217919230185
Is there a sed or awk command that'll allow me to do that easily?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…