Bash script set help function
Posted xbwer
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Bash script set help function相关的知识,希望对你有一定的参考价值。
set -o nounset
help()
{
cat <<- EOF
Desc: execute f1x for each case in Codeflaws
Usage: ./exec_codeflaws.sh [Codeflaw_dir] [f1x_path] [run-f1x-codeflaw.rb_Dir]
EOF
exit 0
}
while [ -n "$1" ]; do
case $1 in
-h) help;;
--) shift;break;;
-*) echo "error: no such option $1."; exit 1;;
*) break;;
esac
done
Referred from: https://blog.csdn.net/hejinjing_tom_com/article/details/79946427
以上是关于Bash script set help function的主要内容,如果未能解决你的问题,请参考以下文章