Mine
public shellscript v1 · immutable# get opts will get options passed at the start of the program. If the flag should have a parameter after it, then you put : after the letter.# getops options variable# when it's run through, if there is a parameter it is stored in $OPTARGwhile getopts hvifd: options case "$options" in f) budh_fdisk ;; i) usr_input ;; d) dstDisk=$OPTARG non_usr_input ;; h) echo "NOT YET CREATED" ;; v) pversion ;; \?) usage ;; esacdone