emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-grep and complicated patterns


From: Eli Zaretskii
Subject: Re: find-grep and complicated patterns
Date: Wed, 13 Dec 2006 06:23:32 +0200

> Date: Wed, 13 Dec 2006 03:35:07 +0100
> From: Lennart Borgman <address@hidden>
> 
>    find . -name "*.el" -type f -print0 | xargs -0 -e grep -nH -e "aaa bbb"
> 
> where there is a space in the pattern? The above does NOT work! Is this 
> platform dependent? (On w32 you may use Cygwin or Gnuwin32+cmd.exe here.)

I suspect that this is a bug in the Windows port of xargs: when it
invokes Grep, the quotes are already stripped, and it fails to quote
them again.

But the only way to be sure that my guess is correct is to see what
arguments Grep sees.  I suggest to write a short test program that
displays its argv[] array, then invoke it instead of Grep, and see
what it says.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]