all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: npostavs@users.sourceforge.net,Dmitry Gutov <dgutov@yandex.ru>
Cc: 23451@debbugs.gnu.org, Kaushal Modi <kaushal.modi@gmail.com>
Subject: bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools
Date: Mon, 29 May 2017 07:19:46 +0300	[thread overview]
Message-ID: <7578C407-59D5-4D05-996A-7E81FCC12A11@gnu.org> (raw)
In-Reply-To: <87shjo4ben.fsf@users.sourceforge.net>

On May 29, 2017 5:58:08 AM GMT+03:00, npostavs@users.sourceforge.net wrote:
>Dmitry Gutov <dgutov@yandex.ru> writes:
>
>> 4. See the user error about status 1, and the message containing four
>> grep hits. Doing this search with Ag confirms the same set of hits
>> (with normal exit status).
>>
>> Could someone please explain why find-grep exits with status 1 here?
>
>I see the same exit status when running find ... -exec grep ... + from
>the shell.  It seems that -exec <cmd> + will cause 'find' to exit with
>status 1 if the <cmd> exits with status 1:
>
>    ~$ find . -exec false '{}' + ; echo $?
>    1
>    ~$ find . -exec true '{}' + ; echo $?
>    0
>
>So when <cmd> is grep, and the number of files is greater than the
>command line length limit, the exit status is effectively random (it
>depends on 'find' decides to group the batches of files it passes to
>'grep').

Isn't this simply the consequence of grep returning non-zero status
for files that didn't match?





  reply	other threads:[~2017-05-29  4:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 18:02 bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools Kaushal Modi
2017-05-29  0:07 ` Dmitry Gutov
2017-05-29  1:01   ` Dmitry Gutov
2017-05-29  2:58     ` npostavs
2017-05-29  4:19       ` Eli Zaretskii [this message]
2017-05-29  8:28         ` Dmitry Gutov
2017-05-29  8:50       ` Dmitry Gutov
2017-05-29 12:43         ` npostavs
2017-05-29 17:35           ` Eli Zaretskii
2017-05-29 22:00             ` Dmitry Gutov
2017-05-30  5:59               ` Eli Zaretskii
2017-05-30  8:11               ` Eli Zaretskii
2017-10-09 14:30                 ` Kaushal Modi
2017-05-29 21:44           ` Dmitry Gutov

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

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

  git send-email \
    --in-reply-to=7578C407-59D5-4D05-996A-7E81FCC12A11@gnu.org \
    --to=eliz@gnu.org \
    --cc=23451@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=kaushal.modi@gmail.com \
    --cc=npostavs@users.sourceforge.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.