[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a De
From: |
Stephane Chazelas |
Subject: |
[bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed |
Date: |
Wed, 23 Feb 2022 12:03:48 -0500 (EST) |
Follow-up Comment #3, bug #62043 (project findutils):
The point is that with -d '\n' an input that contains one newline character
has one empty record, and one with two newlines has 2 empty records and so
on.
With -0, an input with one newline character optionally followed by a NUL has
one record made of one newline character, an input with one NUL has one empty
record and so on.
With -0/-d, only an empty input has no record.
With neither -0/-d, an input like [newline][space][tab][newline]... has no
record, an input like '' "" '' has 3 empty records.
So maybe a better wording could be:
-r: if the input doesn't contain any record/argument, do not run the command
once with no argument as is otherwise done by default for standard
compliance.
I would not mention *standard* input, as with -a, the input comes from a file
argument.
Note that with NetBSD xargs, the -r behaviour is the default (which makes it
non-POSIX-compliant).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62043>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed, Paul Eggert, 2022/02/13
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed, Andreas Metzler, 2022/02/13
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed, Andreas Metzler, 2022/02/13
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed,
Stephane Chazelas <=
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed, Andreas Metzler, 2022/02/23
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed, James Youngman, 2022/02/23
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed, Stephane Chazelas, 2022/02/23
- [bug #62043] The xargs -r, --no-run-if-empty Option Is Ignored When a Delimiter Is Passed, Andreas Metzler, 2022/02/24