Have you ever been annoyed by the the auto expansion of wildcards by Shell?
The wildcard expansion is a fantastic feature, but sometimes it turns out to be very pesky especially when shell expands the wildcards in an argument passed to some other program and your requirement was not to expand the them.
When we ask a Linux/UNIX user on how to turn off the ‘wildcard’ expansion in BASH Shell, an immediate reply would be use single quotes.
Are there any facilities provided by BASH Shell to turn off wildcard expansion permanently?
‘noglobe’option. To set the
‘noglobe’option, please execute the below command at the BASH shell:
bash-prompt#>set -o noglobe;
More often, the requirement is to turn off Path name expansion. This is especially useful if a wildcard is part of an argument to a program.
set –f in such cases. Execute ‘
set –f’ as below
To reset the wildcard expansion property of the BASH Shell, execute ‘