Not able to read Command line argument in shell script using getopt in OS X Terminal
See man getopt. Basically the getopt which is part of macOS doesn't support long option names. Using

OPTS=`getopt f:l: $*`


works as expected.

PS: The man page also recommends to use $* instead of "$@" but this is not related to your problem.