I am reading from an XML file and want to find this property and replace the value 50 by 45 Before:
<name>ipc.client.connect.max.retries</name>
<value>50</value>
After:
<name>ipc.client.connect.max.retries</name>
<value>45</value>
I am using
pcregrep -M '<name>ipc.client.connect.max.retries</name>.*(\n|.)*<value>45</value>' core-site.xml
to find the string.
I tried
sed 's/$string1/$string2' core-site.xml
it doesnt work