【求助】1%%-*是什么意思

【求助】1%%-*是什么意思

新手入门,请问1%%-*是什么意思啊,多谢了,在线等      
上下文??      

while [ $# -ne 0 ]
do
    case "$1" in
           *)
            temp=${1%%-*}
            if [ -z $temp ];then
                echo "Wrong command line parameter : \"$1\", exit..."
                exit 1
            fi
    esac
    shift
done      
在回答您这个问题之前, 建议您先看一下本版置顶的几个帖子      
好的,多谢。      
复制内容到剪贴板
代码:
   Parameter Expansion
       The `$' character introduces parameter expansion, command substitution,
       or  arithmetic  expansion.  The parameter name or symbol to be expanded
       may be enclosed in braces, which are optional but serve to protect  the
       variable  to be expanded from characters immediately following it which
       could be interpreted as part of the name.

       When braces are used, the matching ending brace is the  first  `}'  not
       escaped  by  a  backslash  or within a quoted string, and not within an
       embedded  arithmetic  expansion,  command  substitution,  or  parameter
       expansion.

       ... ...

       ${parameter%word}
       ${parameter%%word}
              The word is expanded to produce a pattern just  as  in  pathname
              expansion.   [color=red]If  the  pattern  matches a trailing portion of the
              expanded value of parameter, then the result of the expansion is
              the  expanded value of parameter with the shortest matching pat-
              tern (the ``%'' case)  or  the  longest  matching  pattern  (the
              ``%%''  case)  deleted.[/color]   If  parameter  is  @ or *, the pattern
              removal operation is applied to  each  positional  parameter  in
              turn,  and the expansion is the resultant list.  If parameter is
              an array variable subscripted with @ or *, the  pattern  removal
              operation  is  applied  to each member of the array in turn, and
              the expansion is the resultant list.

              ... ...
      
For more details about Parameter Expansion, refer to bash's man page.      
多谢斑竹!