From the xargs man page:
Because Unix filenames can contain blanks and newlines, this default behaviour is often problematic filenames containing blanks and/or newlines are incorrectly processed by xargs. In these situations it is better to use the -0 option, which prevents such problems. When using this option you will need to ensure that the program which produces the input for xargs also uses a null character as a separator. If that program is GNU find for example, the -print0 option does this for you.So, long story short: add "-print0" to find, and "-0" to xargs:
find . -name "*txt" -print0 | xargs -0 grep -i poisson
No comments:
Post a Comment