To parse lots of parameters, the prefered way of doing this is using a while loop, a case statement, and shift.
shift is used to pop the first parameter in the series, making what used to be $2, now be $1. This is useful for processing arguments one at a time.
#!/bin/bash
# Load the user define...