Batch XSLT Transformation, find | xarg xsltproc
问题 I'd like to recursively find every "foo.xml" file and on each foo.xml apply the xslt bar.xsl and save over the original foo.xml. When I run the following commands, separately, they work. find . -name foo.xml xsltproc -o foo.xml bar.xsl foo.xml But, when I pipe them, nothing happens to foo.xml. find . -name foo.xml | xargs xsltproc -o foo.xml bar.xsl I think I'm missing something simple... Thanks, in advanced. 回答1: Warning both of these will obviously overwrite the xml's with the