4 ms·
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 f
by porker 7y ago
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.
- scolby33 7y agoPerhaps `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-Builtin.html https://www.gnu.org/software/bash/manual/html_node/The-Shopt...
- bmn__ 7y ago> so why the variation? Difference between dash and bash? Shell options? `man shopt` and grep for glob