Hi,
With the help of some people on this forum, I have been able to do some basic search and replace using sed...
What I would like to do now is to combine 2 of the sed script withing a shell script.
Could someone please help?
Bellow are the 2 command that I run manually I would like to add to my script
Script one :-
sedssl.txt
Script two :- sedssireplace.txt
my first script is run for all file type and the scond is only on .shtml extension
Thank you
With the help of some people on this forum, I have been able to do some basic search and replace using sed...
What I would like to do now is to combine 2 of the sed script withing a shell script.
Could someone please help?
Bellow are the 2 command that I run manually I would like to add to my script
Script one :-
find httpdocs/ -type f -exec sed -i .bak -fsedssl.txt {}\+
sedssl.txt
Code:
s|http://www.mydomain.co.uk/|/|g
s|="./|="/|g
s|="../|="/|g
s|http://ajax.googleapis.com|https://ajax.googleapis.com|g
find httpdocs/ -type f -name' *.shtml' -execsed -i .bak -f sedssicon.txt {}\+
Code:
s/<!--#include virtual="/<?php include '/g
s/"-→/';?>/g
my first script is run for all file type and the scond is only on .shtml extension
Thank you