Hello all,
I have a file with many lines like below and several other small lines in it. For all lines that begin with CREATE DATABASE LINK I have to replace <PWD> (i.e field 10) with <field 7>_ppp . field7 is not constant and it varies from one line to other. It needs to be dynamically sustituted. Shown it below in detail, could some one help with me with the substitution?
Before:
CREATE DATABASE LINK "abc.com" CONNECT TO testuser IDENTIFIED BY <PWD> USING 'abc.com';
After replace, the line should become.
CREATE DATABASE LINK "abc.com" CONNECT TO testuser IDENTIFIED BY testuser_ppp USING 'abc.com';
Will appreciate your help. Thanks in advance.
I have a file with many lines like below and several other small lines in it. For all lines that begin with CREATE DATABASE LINK I have to replace <PWD> (i.e field 10) with <field 7>_ppp . field7 is not constant and it varies from one line to other. It needs to be dynamically sustituted. Shown it below in detail, could some one help with me with the substitution?
Before:
CREATE DATABASE LINK "abc.com" CONNECT TO testuser IDENTIFIED BY <PWD> USING 'abc.com';
After replace, the line should become.
CREATE DATABASE LINK "abc.com" CONNECT TO testuser IDENTIFIED BY testuser_ppp USING 'abc.com';
Will appreciate your help. Thanks in advance.