In below code when I give option r then getopts requires one arguments:
while getopts ":hr::l:" opt; do
case $opt in
r ) echo "Run Numbers - argument = $OPTARG " ;;
l ) echo "Latency range - argument = $OPTARG" ;;
h ) helptext
graceful_exit ;;
* ) usage
clean_up
exit 1
esac
done
But I need to pass two arguments after -r option, instead of one. Is there an easy way to do this?