bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms no


From: npostavs
Subject: bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools
Date: Sun, 28 May 2017 22:58:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

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').






reply via email to

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