I have a manifest.xml file in Git, and I need to make a Perl script where I find the fetched path in the file.
For example, fetch="ssh://gerrit-xyz.com"
. I have to replace just this line with fetch="git://gerrit-xyz.com/projects/aosp"
.
I don't want to copy the XML file to a new one, because the XML file is huge, and it's not worth it. I just want to find the line through a regular expression (it's normally on 4-5th line in the XML) and replace it with the latter version of fetch.
All the related answers I saw were suggesting to copy in a new file, which is not acceptable in my scenario. How can I do it?