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
If you have any questions about this article, welcome to leave a message on the message board.
Brad(Bowen) Xu
E-Mail : maxxbw1992@gmail.com