Sunday, April 19, 2020

Learn Thou xargs John McNamara!

What he tells you to do :

$ unzip myfile.xlsm -d myfile
$ xmllint --format `find myfile -name "*.xml" | xargs` | grep "Pr.*codeName
"


(that's cool that you can specify the output dir with -d)

What you're better off doing :

$ find myfile -name '*.xml' | xargs xmllint --format | grep 'Pr.*codeName'

works!

No comments: