This is my requirement.
I need to replace all files with specific patterns.
the list of patterns will be specified in a file like this
(string to replace and string to replace with)
<p>Global</p> <p>local</p>
<p>fail</p> <p>success</p>
I've used a shell script to do this. Read a file,
and using sed I've tried to replace. But I'm getting an error like
sed: command garbled: s/"<p>Global</p>"/"<p>local</p>"/g
my shell is
for i in `ls *`
do
while read xx yy
do
sed 's/"'$xx'"/"'$yy'"/g $i >tmp/$i
done < patternfile
Please help.
I need to replace all files with specific patterns.
the list of patterns will be specified in a file like this
(string to replace and string to replace with)
<p>Global</p> <p>local</p>
<p>fail</p> <p>success</p>
I've used a shell script to do this. Read a file,
and using sed I've tried to replace. But I'm getting an error like
sed: command garbled: s/"<p>Global</p>"/"<p>local</p>"/g
my shell is
for i in `ls *`
do
while read xx yy
do
sed 's/"'$xx'"/"'$yy'"/g $i >tmp/$i
done < patternfile
Please help.