In a directory I have many XML files, how to search for the string
<text>You are here</text> and replace it with
<text>YOU Are HERE</bc-text> in a unix command
find . -name "*.xml"
In a directory I have many XML files, how to search for the string
<text>You are here</text> and replace it with
<text>YOU Are HERE</bc-text> in a unix command
find . -name "*.xml"
Hi,
Try this,
#!/bin/sh
find /root -name "*.xml" -type f | while read FILE
do
awk '{gsub(/<text>You are here<\/text>/,"<text>YOU Are HERE<\/bc-text>",$0);print}' $FILE
done