xargs does not work correctly with spaces
Brought to you by:
syring
To reproduce, try something like this, where any directory of filename below the current working directory have spaces in their name
find . -type f | xargs grep xxx
Expected result: grep should run on all files
Actual result: when there is a file "My File.txt", grep tries to run on two files: "My" and "File.txt", and fails.
In Unix / Linux environments xargs builds command-line arguments correctly to avoid this.
Maybe in Windows it needs to just quote arguments which have spaces in them.
Crap. This just cost me an hour, and since I can't install Cygwin on this system, I'm SOL. Too bad this has been a bug for so long.
Anybody know any workarounds?