$opt is not a built-in or special variable. If it's mentioned in the script (outside of for opt without the in something part, which @mhawke already explained) it should either be defined earlier in the script or it's expected that it is exported before running the script.