If a specific argument such as -y or --yes is passed I want to make the script non-interactive and skip user confirmation. I also want to know how would I pass the argument to other scripts I source.SHORT=yqLONG=yes,quickPARSED=$(getopt --options $SHORT --longoptions $LONG --name $0 -- $@)eval set -- $PARSEDq=0; autoConfirm=0while true; do    case $1 in        -q|--quick)            q=1            shift            ;;        -y|--yes)            autoConfirm=1            shift            ;;        --)            shift            break            ;;        *)            echo Invalid option.  Use -h for help            exit 3            ;;    esacdoneassertConfirmation () {    local promptMsg=$1 autoConfirm=$2    if (( autoConfirm )); then        return    else        clear        read  -n 1 -p $promptMsg (yes/No)         printf '\n========================================================================'        if [[ $REPLY =~ ^([Yy])$ ]]; then            return        fi    fi    return 1}if assertConfirmation Install this? ${autoConfirm:?}; then    installfisource installation ${autoConfirm:?} ${q:?}
Parsing command line argument to skip user confirmations
shell script