getopts/getopt(轉載)

http://blog.sina.com.cn/s/blog_616b428f01019z5l.htmlhtml 寫程序的時候常常要處理命令行參數,本文描述在Bash下的命令行處理方式。    選項與參數:    以下一個命令行:shell ./test.sh -f config.conf -v --prefix=/home數組    咱們稱-f爲選項,它須要一個參數,即config.conf,
相關文章
相關標籤/搜索