[ubuntu-za] Script error
jonathan at vhata.net
Tue Apr 14 14:19:33 BST 2009
On 14 Apr 2009, at 3:14 PM, Russell Cloran wrote:
> An asterisk glob will never "expand" to zero length, but will rather
> leave the * as is...
Not 100% true. This is the default behaviour, but can be altered by
setting certain bash options. From the manpage:
"If no matching file names are found, and the shell option nullglob is
disabled, the word is left unchanged. If the nullglob option is set,
and no matches are found, the word is removed. If the failglob shell
option is set, and no matches are found, an error message is printed
and the command is not executed."
The 'nullglob' and 'failglob' shell options are disabled by default,
so the behaviour you describe will occur normally, unless the user has
explicitly enabled those options.
More information about the ubuntu-za