I have below content in my parameter file.
[s_m_imgpstna]
$DBConnection1=Insight_QAT331_DB
[s_m_drcgctln]
$DBConnection1=Insight_QAT291_DB
[s_m_ioxgciln]
$DBConnection1=Insight_QAT291_DB
[s_m_reddecna]
$DBConnection1=Insight_QAT291_DB
[s_m_cd2gcpna]
$DBConnection1=Insight_QAT291_DB
[s_m_cd2gcpna]
$DBConnection1=Insight_QAT291_DB
[s_m_cd2gctna]
$DBConnection1=Insight_QAT291_DB
[s_m_g92gctsp]
$DBConnection1=Insight_QAT291_DB
[s_m_os2gcceu]
$DBConnection1=Insight_QAT291_DB
[s_m_ccpgctdf]
$DBConnection1=Insight_QAT291_DB
[s_m_ew4gciln]
$DBConnection1=Insight_QAT307_DB
[s_m_dr6gctln]
$DBConnection1=Insight_QAT291_DB
[s_m_dr2gctln]
$DBConnection1=Insight_QAT291_DB
[s_m_dr4gctln]
$DBConnection1=Insight_QAT291_DB
Now I want to search for the pattern "cd2gcpna" which has two occurrence in file
[s_m_cd2gcpna]
$DBConnection1=Insight_QAT291_DB
[s_m_cd2gctna]
$DBConnection1=Insight_QAT291_DB
Now I want to replace string which is just below of that([s_m_cd2gctna]
) row for all occurrences.
$DBConnection1=Insight_**QAT291**_DB
replace by
$DBConnection1=Insight_**QAT308**_DB