[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #60383] [feature-request] let find read files from stdin or file.

From: Bernhard Voelker
Subject: [bug #60383] [feature-request] let find read files from stdin or file.
Date: Sun, 21 Nov 2021 10:33:46 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Follow-up Comment #12, bug #60383 (project findutils):

Thanks for the feedback and for testing some use cases.

Well, I decided to go the defensive way first because it's always
easier to extend functionality than to remove later.
My thought was that with the regular invocation without a starting point,
find(1) would implicitly assume '.' as the starting point.
In the -files0-from mode, doing the same would feel strange.
Therefore, outputting an error seemed the natural choice.

Of course, your request makes sense, but I wonder what would be
the best way to do it.

As you're mentioning the behavior of xargs(1), there seem 3 alternatives:

a) change -files0-from to silently ignore an empty file.
b) add an extra option like -ignore-files0-empty to tweak the behavior
   of the -files0-from option to ignore an empty input file.
c) add a sister option like -files0-from-ignore-empty (the name is too
   long, of course; it's to demonstrate).

Another choice could be the combination of a) and b), i.e., one would
need an additional option to get an error for an empty input file.

I have no strong preference, clearly a) is the easiest.
Any thoughts?


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]