all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: 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 08:43:58 -0400	[thread overview]
Message-ID: <87lgpf4yup.fsf@users.sourceforge.net> (raw)
In-Reply-To: <26c7e970-5ca6-65f1-f26d-28e674a01a40@yandex.ru> (Dmitry Gutov's message of "Mon, 29 May 2017 11:50:42 +0300")

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 5/29/17 5:58 AM, npostavs@users.sourceforge.net wrote:
>
>> 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').
>
> Can we make Grep exit with 0 no matter if it matched something or not?
> So that non-zero means an actual problem.
>
> There is no suitable command-line option, it seems, but maybe there's
> a shell-based option? Like 'grep ... || exit 0', but I don't think we
> want to swallow exit statuses higher than 1.

This seems to work:

    find ... -exec sh -c 'grep -i -E -nH -e turn-on-eldoc-mode "$@" ; [ $? -le 1 ]' sh '{}' +





  reply	other threads:[~2017-05-29 12:43 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
2017-05-29  8:28         ` Dmitry Gutov
2017-05-29  8:50       ` Dmitry Gutov
2017-05-29 12:43         ` npostavs [this message]
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=87lgpf4yup.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=23451@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=kaushal.modi@gmail.com \
    /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.