News for hackers. Stuff that matters.
Re:A common mistake involving wildcards and the find command by porker on Sunday February 09, 2020 @04:36AM (#22281258)
I don't understand escaping properly.

Why, on some machines (all varying distros of Ubuntu) does

    find -name *.xml
return nothing and I have to use

    find -name '*.xml'
whilst on other machines the first command returns results? The shell is always bash, it's a stock install - so why the variation?

I get that it should always be quoted, but not why it sometimes works when unquoted and other times doesn't.

Re:A common mistake involving wildcards and the find command by scolby33 on Sunday February 09, 2020 @10:25AM (#22282517)
Perhaps `shopt -s nullglob` has been set?

“If set, Bash allows filename patterns which match no files to expand to a null string, rather than themselves.” [1]

[1] https://www.gnu.org/software/bash/manual/html_node/The-Shopt...

Re:A common mistake involving wildcards and the find command by bmn__ on Sunday February 09, 2020 @10:52AM (#22282644)
> so why the variation?

Difference between dash and bash?

Shell options? `man shopt` and grep for glob