News for hackers. Stuff that matters.
Re:A common mistake involving wildcards and the find command... by ukfarmer on Friday December 10, 2021 @12:03PM (#29512237)
"A more intuitive solution would be to resolve globs to nothing (the empty string) if they don't match."

I agree, so I use shopt -s nullglob in both bash scripts and interactive shells. It retrained my interactive habits with find very quickly because unquoted wildcards no longer work in the common case where there's no match in the current directory.

(I like dotglob, extglob, globstar and pipefail everywhere too: saner defaults than emulating traditional shell behaviours.)

There are no comments on this comment yet.