I'm trying to use sed to replace the 2nd instance of the word hashTree with the word ReplacedTxt and update the file Test1.jmx. For some reason the replacing and file updating are not working.- Any ideas?
sed -i '' 's/hashTree/ReplacedTxt/2' Test1.jmx
Test1.jmx is my file that I'm trying to update.
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067">
<hashTree>
<hashTree>
</hashTree>
</jmeterTestPlan>