Now I think about this, I think the real problem is that xargs is inherently hateful.

% echo

% echo -n
%

In a sane world, "echo | xargs cmd" would result in "cmd" being executed as "cmd ''".

But xargs splits on whitespace, rather than newline.

Which is probably historically unfixable, but still hateful.

And, no, xargs -0 is only a partial solution. Though my fingers have learned the macro...

... | tr '\n' '\0' | xargs -0

Unfortunately, "xargs -0" still doesn't DTRT. Hateful trollop.

Reply via email to