This is the way arguments are to handled when you have many of them!
while test $# -gt 0
do
case $1 in
--usage | --help | -h )
usage_and_exit 0
;;
--version | -v )
version
exit 0
;;
*)
error_and_usage "Unrecognized option: $1"
;;
esac
shift
done
#!/bin/bash
while getopts "f:" OPTION
do
case $OPTION in
f)
MYOPTF="$MYOPTF $OPTARG"
echo MYOPTF
;;
esac
done