Ok, I'm trying to run a command to find all files by a certain name under a particular subdirectory and then match and remove a line in them (they're just xml files). I chucked together the command below which worked fine on the simple test directory I assembled in ~/, however as soon as I run it on the actual files I want altered, it's not exactly successful.
Code:
find . -name movie.xml | xargs -0 sed -i.bak '/<set>/d'
Obviously this is run from the parent directory of those which contain the xml file, and they're never found more than 1 subdirectory below this. The command is supposed to match any lines starting with the <set> tag (whether indented or not) and then remove them. If I run the command it appears to list all the matches produced by find, however it doesn't seem to do anything with them (aside from produce the .bak). Where am I going wrong?