------------------------------------------------------------------------ getopts ------------------------------------------------------------------------ source: https://www.theunixschool.com/2012/08/getopts-how-to-pass-command-line-options-shell-script-Linux.html there are three types of command line options $ ls -l #no option $ sort -n #no option $ cut -d "," #one argument follows $ ls -l file1 file2 ... #more than one Bash environmental variables $OPTARG .. contains the argument value for a particular command line option $OPTIND .. contains the index of the next command line option getops optstring optvalue