From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: find-grep and complicated patterns Date: Wed, 13 Dec 2006 06:23:32 +0200 Message-ID: References: <457F66DB.7050303@student.lu.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: dough.gmane.org X-Trace: sea.gmane.org 1165983841 24022 80.91.229.10 (13 Dec 2006 04:24:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2006 04:24:01 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 13 05:23:59 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GuLet-0001H8-CF for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2006 05:23:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuLes-0001WC-Hy for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2006 23:23:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuLee-0001TY-No for emacs-devel@gnu.org; Tue, 12 Dec 2006 23:23:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuLed-0001RV-2c for emacs-devel@gnu.org; Tue, 12 Dec 2006 23:23:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuLec-0001RP-V7 for emacs-devel@gnu.org; Tue, 12 Dec 2006 23:23:38 -0500 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GuLec-0003PN-RF for emacs-devel@gnu.org; Tue, 12 Dec 2006 23:23:39 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-56-152.inter.net.il [80.230.56.152]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id BGE93489 (AUTH halo1); Wed, 13 Dec 2006 06:23:31 +0200 (IST) Original-To: Lennart Borgman In-reply-to: <457F66DB.7050303@student.lu.se> (message from Lennart Borgman on Wed, 13 Dec 2006 03:35:07 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63669 Archived-At: > Date: Wed, 13 Dec 2006 03:35:07 +0100 > From: Lennart Borgman > > 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.