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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -