Need a bash script or python script to find and replace text between two tags?
E.g:
<start>text to find and replace with the one I give as input<end>
‘ text to find and replace with the one I give as input’ is just an example and it could vary every time.
I want to do something like ./changetxt inputfile.xxx newtext
where changetxt has the script;
inputfile.xxx has the text that needs a change and newtext is what goes into inputfile.xxx
python:
Save this in a replacetext.py file and run as python replacetext.py \path\to\inputfile “I want this text between the tags”