Is there a way to prevent wildcard expansion on the find command so that the following would work? find . -iname foo [bar]As pointed out here, I tried running set -f, set -o noglob and setopt noglob just before find but it didn't work. It's a bash script and I'm using Ubuntu 10.04. I know I could just escape the wildcard characters but I fear I might leave one out. 
Prevent wildcard expansion on find
shell;find;wildcards
As @njsg already said, the problem is caused by find, not the shell: The double quotes you are using are already protecting your expression from the shell; it is passed to find unmodified. The problem is that find treats the argument to -name and -iname as a pattern. The only way to suppress that would be to use a find option that does not treat its argument as a pattern. But find has no such thing, according to my manual page, so what you want cannot be done. The best you can do is enhance your script to escape the brackets automatically, before passing them to find. The following funny-looking sed substitution will do that for you:echo foo [bar] | sed 's/[][]/\\&/g'Will print: foo \[bar\]