in reply to User input taking capslock into account
... exit if lc $user_input eq "e\n"; [download]
Alternatively:
... exit if uc $user_input eq "E\n"; [download]
(see lc)