De help getopts (em bash ):
getopts: getopts optstring name [arg] Parse option arguments. Getopts is used by shell procedures to parse positional parameters as options. OPTSTRING contains the option letters to be recognized; if a letter is followed by a colon, the option is expected to have an argument, which should be separated from it by white space.
Eu acho que é válido também para sh . Você deve tentar ":a:f:l:r:hv" em vez de ":a:f:l:r:h:v:" .