The explanation is further down on the page. If I wrote in that recommended order, many other developers would complain "I don't want all the details, just tell me what to do".
I wrote it this way because some developers just want the tl;dr version, that is, they "just want the answer"
The POSIX folks are finally adding formal support for null terminated filenames in filename lists (which is what a lot of people are doing). So that's something.
Perhaps you are referring to the first section which is introduced as being a brief tl;dr:
> Here’s a quick summary about how to do it correctly, for the impatient who “just want the answer”.
The full document below that tldr includes for example this explanation of the reason for using ./* over *. Namely, flag injection: > This is important because almost all commands will interpret a string beginning with dash as an option, not as a filename, until they see something that does not begin with dash. Globs are expanded by the shell into a list of filenames, and dash is earlier in the sort order compared to before alphanumerics, so it is easy for attackers to make this happen.Do you prefix the find line there eith a backtick?
It looks robust, and I am interested in using this technique
find . -print0 | xargs -0 -n1 ./sub_script.sh
find . -mindepth 1 -maxdepth 1 -name '*some*pattern' -print0 \
| xargs -0 -n1 -I{} /usr/bin/env bash -c \
'printf "%s" "$*"' _ {} ls -l -- -file-name-with-dash
cat -- -file-name-with-dashAs you point out, not all commands support this convention and the author feels that it would be hard to enforce this consistently among maintainers. I agree that it would be easier (for me) to remember to prefix globs with `./`.
For example, why "./*" rather than "*". Not helpful to understand the core principal / reality.