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

From: Markus Wichmann <nullplan_AT_gmx.net>
Date: Wed, 18 Jul 2018 18:32:57 +0200

On Tue, Jul 17, 2018 at 07:28:25PM -0700, Eric Pruitt wrote:
> The suckless tools don't strictly follow POSIX. For example, sbase mv(1)
> and cp(1) don't support "-i". Furthermore it's pretty portable; find(1)
> on OpenBSD, FreeBSD, macOS and GNU find(1) all support using NUL bytes.
> It's the only sane way to securely support any legal filename.
>
> Eric
>

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.

Ciao,
Markus
Received on Wed Jul 18 2018 - 18:32:57 CEST

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