2019-06-07 23:39:51 -0700, L A Walsh: > On 2019/06/05 02:06, Joerg Schilling wrote: > > I believe that there is a > > need to be able to check whether a shell hides "." and ".." from the glob > > results. > > > How will you tell if that is the case, or whether or not the > underlying OS hides (or provides) them, OR whether or not the > underlying file system supports them? [...]
I beleive Joerg meant that we need a way to *ensure* that the shell excludes "." and ".." from glob expansions. Otherwise: chmod a-x .* Could still be unsafe if we don't know the version of the standard the shell is conforming to. Doing: set -o globskipdot chmod a-x .* Would be "OK" as we'd expect the older shells to exit (upon the (presumed) failure of "set" which is a special builtin) before they reach the chmod command. That would mean chmod would not be run, but that means the script would fail which is not better. Which is why we've argued here it was not really a solution to the problem. -- Stephane
