bug-findutils
[Top][All Lists]
Advanced

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

[bug #54730] Add additional valuable example of find -quit


From: James Youngman
Subject: [bug #54730] Add additional valuable example of find -quit
Date: Thu, 27 Sep 2018 04:07:55 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Follow-up Comment #5, bug #54730 (project findutils):

Hmm, given that -exec ... ; does not affect the exit status, it is unfortunate
that there is no other way for the user to (directly) affect it.   Viz:

jupiter:~$ find / -exec false \; -o -quit
jupiter:~$ echo $?
0

The most obvious workaround (making use of the fact that the -exec + form does
affect the exit status) is pretty horrible:

jupiter:~$ find / -exec false \; -o \( -exec false {} \+  -quit \) ; echo $?
1

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54730>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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