Hello All,
Here is the file which I want to edit. The script should look for DB2 and if found then delete all lines related to DB2 connection string. Is there way this can be done using script ?
DB1 =
(DESCRIPTION =
(SDU = 32768
(enable = broken)
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = myserver.com)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = DB1)
)
)
DB2 =
(DESCRIPTION =
(SDU = 32768)
(enable = broken)
(ADDRESS = (PROTOCOL = TCP)(HOST = anotherserver.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = anotherserver.com)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = DB2)
)
)
DB3 =
(DESCRIPTION =
(SDU = 32768)
(enable = broken)
(ADDRESS = (PROTOCOL = TCP)(HOST = thirdserver.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = thirdserver.com)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = DB3)
)
)