I am trying to replace a particular command. CDBFILELOCATION to +DATAC1/vbmtmdppg/ but it doesn't seem to be working. I saw some reference but all they have give is a blank slash example which is hard to understand. Please find the command i am using right now.
sed -i 's/CDBFILELOCATION/+DATAC1/vbmtmdppg/g' /u01/app/oracle/admin/vbmtmdpp/cr_db/mtmp_plug_pdb.sql
You must escape the
/ in the replacement string:
sed -i 's/CDBFILELOCATION/+DATAC1\/vbmtmdppg/g' /u01/app/oracle/admin/vbmtmdpp/cr_db/mtmp_plug_pdb.sql
Alternatively, you can use a different delimiter in place of
sed -i 's|CDBFILELOCATION|+DATAC1/vbmtmdppg|g' /u01/app/oracle/admin/vbmtmdpp/cr_db/mtmp_plug_pdb.sql