possible duplicate of Using getopts in bash shell script to get long and short command line options – Dave Jarvis Mar 29 '13 at 21:30 ...
stackoverflow.com