Removed the $ in the variable declaration of the for...in bash loop to correct the code.
In the case statement, the "in" keyword should be on the same line as case $VARIABLE. Also, ;; should be present at the end of each command. Shell executes all statements up to the two semicolons that are next to each other.