All pastes #396992 Raw Edit

Anonymous

public shellscript v1 · immutable
·published 2007-03-16 04:04 UTC
rendered paste body
# 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