This is such a simple question that I'm sure it's been asked somewhere, but I can't find it.  My shell, which I have not intentionally set up to do so, seems to eat any words involving question marks:$ bash --versionGNU bash, version 4.3.42(1)-release (x86_64-apple-darwin13.4.0)Copyright (C) 2013 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software; you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.$ echo a ? = =?a =$ not-a-command? echo aa$ (?) echo aaIn case it matters, note that any word containing a question mark seems to disappear completely silentlyto the extent that she shell never even notices that the invocation starts with a word that doesn't specify a valid executableeven if the question mark is not at the beginning.
Shell eating `?` characters
bash;shell;quoting;special characters
You probably have the nullglob shell option enabled; this causes any word containing a globbing character (* or ?) to be removed if the glob doesn't match anything. Thus, if you're in a folder which doesn't contain any file, folder etc. with a single-character name, ? won't expand to anything and will instead be removed; likewise, not-a-command? is unlikely to match anything and will instead be removed.To check whether this is the case, runshopt nullglobTo de-activate the option, runshopt -u nullglob