The use of getopt in bash

-sharp!/bin/bash

ARGS=`getopt -o ab: -l "argv3:,help" -- "$@"`
eval set -- "${ARGS}"

while true;
do
    case "$1" in
        -a) 
            echo "i am a"
            shift
            ;;
        -b) 
            echo "i am b, my value is $2" 
            shift 2
            ;;
        --argv3)
            echo "i am argv3, my value is $2"
            shift 2
            ;;
        --help)
            echo "i am help info"
            exit 0
            ;;
        --)
            shift
            break
            ;;
        *)
            echo "Internal error!"
            exit 1
            ;;
    esac
done

the above file is saved as test.sh
1.test.sh, and Internal error!

will be output.
  1. -- "$@"

$@ represents all the parameter lists.
what does the "$@" here mean?

ARGS=`getopt -o ab: -l "argv3:,help" -- "$@"`

rewrite ARGS= getopt-o ab:-l "argv3:,help"-"$@" to

ARGS=`getopt -o ab: -l "argv3:,help" ` 

Mar.18,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36374-2bfdb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36374-2bfdb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?