linux - shell get parse arguments -


i want use shell script this:

myscript.sh -key keyvalue 

how can keyvalue ? tried getopts, requires key single letter!

use manual loop such as:

while :;   case $1 in     -key)       shift       echo $1       break     ;;     *)       break   esac   done 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -