HI Gurus - Need some help with sed. I have been struggling for last few hours to get this working but in vain. Here is the problem:
I have a file as shown below:
#!/usr/bin/ksh
. /db2bkup/dba/standard/db2td2/instance/DB2TD2.sh
. /db2bkup/dba/standard/db2td2/bin/db2td2.td2.variables
#VERSION=1.0.0.1
export SEND_PAGE_ONCALL="no"
export SEND_INFO_ONCALL="no"
export SENDUSRALM="no"
export SENDEMAIL="yes"
. ~$DB2INSTANCE/sqllib/db2profile
export compressbkup="compress" #to compress use the following syntax compressbkup="compress"
##export backupdir='/db2bkup/TD2/online/data1,/db2bkup/TD2/online/data2,/db2bkup/TD2/online/data3,/db2bkup/TD2/online/data4'
export backupdir='/db2/TD2/bkup01/online/data1,/db2/TD2/bkup01/online/data2,/db2/TD2/bkup01/online/data3,/db2/TD2/bkup01/online/data4'
#to use multiple directories. Ex. export backupdir='/db2bkup01/sample1,/db2bkup01/sample2'
##$DBALIB/config/backup.online
The line is question is line 12 (need not be line 12 always; just happens to be the one in the above script) and is shown below: (Note there is a similar line 11 but with comments. I want to leave this line 11 as it is).
export backupdir='/db2/TD2/bkup01/online/data1,/db2/TD2/bkup01/online/data2,/db2/TD2/bkup01/online/data3,/db2/TD2/bkup01/online/data4'
I want to replace this line with a memory variable (say $newfilepath).
How do I search specifically for this line in the file and replace it using sed or for that matter any other command ?
Please help. Thank you for your time.