There are multiple locations where my file.xml resides. I want to replace certain instances of the file.xml with another file.xml. I can find all the paths where the file is present. Of all the paths found, I need to replace the original with the new one only when the path contains process-server/config
find . -name "file.xml"
gives me all the paths where the file resides.. I only want to select few paths based on the condition to replace.
I am not trying to replace a string in the file, but replace a complete file if the path of the file contains a substring (to be more precise the end of the path should be the substring)