Hi ,
I have to do a migration from staging to production. I have 50 files where I need to change the hostnames and urls to new environment hostnames and urls. Please can somebody help me in writing a script using which I can read a hostname1 from a file and then search in a second file and change it with new hostname which is also given in first file. I think we can use array for old and new hostnames , only problem is how to search a array value in the file and replace it with second array value.
Please help, thanks iin advance.
Thanks,
Krishan]
I have to do a migration from staging to production. I have 50 files where I need to change the hostnames and urls to new environment hostnames and urls. Please can somebody help me in writing a script using which I can read a hostname1 from a file and then search in a second file and change it with new hostname which is also given in first file. I think we can use array for old and new hostnames , only problem is how to search a array value in the file and replace it with second array value.
Please help, thanks iin advance.
Thanks,
Krishan]