On Tue, Sep 09, 2008 at 03:28:15PM -0600, Greg Woods wrote:
On Tue, 2008-09-09 at 15:24 -0400, John Dennis wrote:
Wildcards passed to commands must always be quoted or escaped
Well, no, not always any more. If I did something like "cd /root" first, then the yum commands work just fine. It's a bash feature that if the wildcard doesn't actually match anything, then it is passed as an argument verbatim (as opposed to csh, which would have complained "no match" and not done anything).
You can get bash to complain about wildcards that _don't_ match a file by adding shopt -s failglob to your .bashrc. Of course, that can leave you surprised later if you are expecting that non-default behavior and start to work with a login that doesn't set it. And setting it could make it harder to use scripts that do expect the default behavior. -- Mike Stroyan, mike.stroyan@hp.com