There are a couple of errors:
mainMenuInput=""
while [ "$mainMenuInput" != "Q" ] && [ "$mainMenuInput" != "q" ]
See that variable declaration do need to be like var=value. Otherwise, bash would interpret that you want to perform the var command with = and value as parameters:
mainMenuInput=""
^
no spaces around =
In the while you need to put spaces around the brackets. Also, note that you need to use && (and) instead of || (or), because otherwise it won't ever exit the while.
while [ "$mainMenuInput" != "Q" ] && [ "$mainMenuInput" != "q" ]
^ ^^ ^
space it has to be AND space
In fact, the condition can be rewritten to something like:
while [[ "$mainMenuInput" != [qQ] ]]