O comando getopt do GNU usa o GNU getopt () função de biblioteca para faça a análise dos argumentos e opções.
A página man getopt (3) afirma:
If getopt() does not recognize an option character, it prints an error message to stderr, stores the character in
optopt, and returns?. The calling program may prevent the error message by setting opterr to 0.
Portanto, ? é usado para sinalizar "opção desconhecida" e não pode ser usado como
um valor de opção. (Seria impossível dizer a opção -? de
uma opção desconhecida.)