getopts/getopt(转载)

http://blog.sina.com.cn/s/blog_616b428f01019z5l.htmlhtml 写程序的时候常常要处理命令行参数,本文描述在Bash下的命令行处理方式。    选项与参数:    以下一个命令行:shell ./test.sh -f config.conf -v --prefix=/home数组    咱们称-f为选项,它须要一个参数,即config.conf,
相关文章
相关标签/搜索