unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: find-grep and complicated patterns
Date: Wed, 13 Dec 2006 06:23:32 +0200	[thread overview]
Message-ID: <ulklce857.fsf@gnu.org> (raw)
In-Reply-To: <457F66DB.7050303@student.lu.se> (message from Lennart Borgman on Wed, 13 Dec 2006 03:35:07 +0100)

> Date: Wed, 13 Dec 2006 03:35:07 +0100
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> 
>    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.

  parent reply	other threads:[~2006-12-13  4:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13  2:35 find-grep and complicated patterns Lennart Borgman
2006-12-13  3:07 ` Miles Bader
2006-12-13  4:23 ` Eli Zaretskii [this message]
2006-12-13  6:32   ` Jari Aalto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ulklce857.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).