Re: "find" ends with exit code "0" although exec command returned an error

2015-10-04 Thread Bernhard Voelker
On 10/04/2015 06:46 PM, Thomas D. wrote: > Hi, > > for me it looks like "find" returns an invalid exit code when "-exec" > returns an error: > > $ mkdir /tmp/find-test > $ touch /tmp/find-test/scripts{1..10}.sh > $ touch /tmp/find-test/text{1..10}.txt > $ find /tmp/find-test -name '*.sh' -exec ch

"find" ends with exit code "0" although exec command returned an error

2015-10-04 Thread Thomas D.
Hi, for me it looks like "find" returns an invalid exit code when "-exec" returns an error: $ mkdir /tmp/find-test $ touch /tmp/find-test/scripts{1..10}.sh $ touch /tmp/find-test/text{1..10}.txt $ find /tmp/find-test -name '*.sh' -exec chmod 755 \; \ && echo "find succeed" || echo "find failed"