I run the following command which comments out all lines that contain the text "dlclose"
grep -lIR "dlclose" . | grep -v ".svn" | xargs sed -i "s/.*dlclose.*/\/\/&/g"
However, sed claims that the piped files don't exist:
sed: can't read ./Utilities/src/DynLib.cpp: No such file or directory
This doesn't make any sense since grep was able to find and pipe the filename.
What is going on here? Is it piped in the wrong format?
Also, as a side note, I would like to merge the two greps, but I am forced to use grep 2.5.1 which doesn't have exclude-dir