in reply to getopts help

however in the script they are assigning a variable to $opt_f, but isn't that option supposed to be a Boolean?
$opt_f is a scalar variable. It can be assigned any legal scalar value: 0, 1, 734, 'abc', etc. Your Getopts function is probably setting $opt_f to 1 if -f appears on the command line. I agree that assigning it in your script is strange, but it is legal.