3 ms·
It depends on which OS you're on. GNU xargs: Normally runs the command at least once, but you can turn that off with "-r" or "--no-run-if-empty". OpenBSD xarg
by LukeShu 6y ago
It depends on which OS you're on.
GNU xargs: Normally runs the command at least once, but you can turn that off with "-r" or "--no-run-if-empty".
OpenBSD xargs: Like GNU, but only has the short "-r" version of the flag.
FreeBSD xargs: Never runs the command if the input is empty, has "-r" (but not "--no-run-if-empty") as a no-op compatibility flag for GNU.
macOS xargs: Never runs the command if the input is empty (has no "-r" or "--no-run-if-empty" flags).
- kevans91 6y agoI see no reason not to also provide the compatible long option on FreeBSD: https://svnweb.freebsd.org/changeset/base/365954 https://svnweb.freebsd.org/changeset/base/365954