[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: |
Mon, 29 May 2017 08:43:58 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
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 '{}' +
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Dmitry Gutov, 2017/05/28
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Dmitry Gutov, 2017/05/28
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, npostavs, 2017/05/28
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Dmitry Gutov, 2017/05/29
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools,
npostavs <=
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Eli Zaretskii, 2017/05/29
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Dmitry Gutov, 2017/05/29
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Eli Zaretskii, 2017/05/30
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Eli Zaretskii, 2017/05/30
- bug#23451: 25.0.93; Clarify the dependency on find/grep for platforms not having those tools, Dmitry Gutov, 2017/05/29