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.
Log in to post a comment.