shell脚本中的多个参数

时间:2015-04-27 15:21:37

标签: bash shell

我想构建一个接受多个可选参数的shell脚本。但是,在获取参数时,我有点卡住了。我希望以多种方式调用脚本

Multiple directives [ngView, ngView] asking for transclusion on: <!-- ngView: -->

这将创建文件夹测试,初始化git并添加具有给定URL的远程

loadedModules: ['module']

这将与上面相同,但也为用户安装grunt / a gruntfile

scriptname test -gm git@remote.com

这将创建一个文件夹测试,并安装grunt而不用git

做任何事情

但是,似乎只在脚本中使用了我的-gm参数

scriptname test -gm git@remote.com -ig

测试永远不会输出。它与scriptname test -ig有关吗?我真的不知道如何使用可选的多个参数

0 个答案:

没有答案
相关问题