what is the easiest, most straight forward, way to use getopts in bash script. if i have a script called: myscript and it CAN take the the arguments: -p -r -s -x
I\'m looking for a way to handle arguments containing blank spaces that has to be parsed by shell getopts command.
I\'m trying to wrap a bash script b with a script a. However I want to pass the options passed to a also to b as they are.
This question already has answers here: Why does getopts only work the first time? (2 answers) Closed 3 years ago.
I\'ve got a bash function that I\'m trying to use getopts with and am having some trouble. The function is designed to be called by itself (getch), with an optional -s flag (getch -s), or with an opt
目录linux shell 解析命令行参数|getpotsgetpotslinux shell 解析命令行参数|getpots demo: