Re: [dev] [sbase] find and xargs different results than busybox

From: Eric Pruitt <eric.pruitt_AT_gmail.com>
Date: Wed, 18 Jul 2018 10:04:01 -0700

On Wed, Jul 18, 2018 at 06:32:57PM +0200, Markus Wichmann wrote:
> And that's where you're wrong. "find | xargs" is wrong for the same reason
> "sudo su" is wrong, for the same reason "cat singlefile | whatever" is
> wrong: You're doing it wrong. In your case "find -exec" does everything
> you want. It also supports all possible file names.

I didn't provide a case, but here's one I have mind: what if you only
want to run commands if "find" finishes with an exit status of 0? With
find -print0 and xargs -0, it'd look like this:

    set -e
    find ... -print0 > results
    xargs -0 ... < results
Received on Wed Jul 18 2018 - 19:04:01 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 18 2018 - 19:12:07 CEST