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的更多相关文章

  1. Bash+R: howto pass parameters from bash script to R(转)

    From original post @ http://analyticsblog.mecglobal.it/analytics-tools/bashr/ In the world of data a ...

  2. [Matlab] Attempt to execute SCRIPT *** as a function

    Attempt to execute SCRIPT *** as a function 问题: 在运行MATLAB程序的时候,出现如题的报错. 原因: 在系统中,现有的.m文件有的与***函数重名,所 ...

  3. Linux: bash script

    content [toc] bash scripts equivalent bash command to rename a bash variable/command alias fire='fir ...

  4. matlab: Attempt to execute SCRIPT *** as a function 错误

    编写matlab程序时,出现了“Attempt to execute SCRIPT mean as a function”,其实这是“Attempt to execute SCRIPT *** as ...

  5. Run bash script as daemon

    linux - Run bash script as daemon - Stack Overflow https://stackoverflow.com/questions/19233529/run- ...

  6. Linux bash script regex auto replace

    Linux bash script regex auto replace 自动替换 /assets/css/0.styles.96df394b.css => ./assets/css/0.sty ...

  7. Linux Bash Script conditions

    Linux Bash Script conditions shell 编程之条件判断 条件判断式语句.单分支 if 语句.双分支 if 语句.多分支 if 语句.case 语句 refs http:/ ...

  8. Linux Bash Script loop

    Linux Bash Script loop shell 编程之流程控制 for 循环.while 循环和 until 循环 for var in item1 item2 ... itemN do c ...

  9. 高级Bash Scripting系列笔记--01之“什么情况不适用Bash Script”

      1. 占用资源的任务,尤其那些影响速度的工作 比如排序,哈希,递归等等. 2. 大量使用数学运算 尤其是浮点运算,比如任意精度的计算或者复数计算等等,这类使用C++会好很多. 3. 跨平台的(适用 ...

随机推荐

  1. Hadoop2.2.0集群的HA高可靠的最简单配置

    HA集群需要使用nameservice ID区分一个HDFS集群.另外,HA中还要使用一个词,叫做NameNode ID.同一个集群中的不同NameNode,使用不同的NameNode ID区分.为了 ...

  2. python之多态与多态性

    1.多态的概念:多态指的是一类事物有多种形态,(一个抽象类有多个子类,因而多态的的概念依赖于继承) 比如:序列类型有多种形态:字符串,列表,元组 动物有多种形态:人,狗,猪 import abc cl ...

  3. python之面向对象的程序设计

    一.什么是面向对象的程序设计 面向过程的程序设计的核心是过程,过程即解决问题的步骤,面向过程的设计就好比精心设计好一条流水线,考虑周全什么时候处理什么东西. 优点是:极大的降低了程序的复杂度 缺点是: ...

  4. CSS魔法堂:display:none与visibility:hidden的恩怨情仇

    前言  还记得面试时被问起"请说说display:none和visibility:hidden的区别"吗?是不是回答完display:none不占用原来的位置,而visibilit ...

  5. Quartz定时器中Cron时间控制表达式写法

    Quartz定时器中Cron时间控制表达式写法:   1.表示形式 该表达式简洁简单,总共有7个空格分割的表达子式,形式为[* * * * * * *],而这七个位置上的东西表达方式有很多,意义从左往 ...

  6. isPrototypeOf 与 instanceof区别

    1.代码 <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF- ...

  7. V-rep学习笔记:切削

    V-REP allows you to perform cutting simulations. The user can model almost any type of cutting volum ...

  8. 在django中怎么解决没有MySQLdb库的问题

    1.安装:pymysql模块 2.在app文件目录下,找到__init__.py文件,在文件中写入下面的代码 #解决django中的MySQLdb模块在python3中没有的问题 import pym ...

  9. Linux 修改时区

    CentOS 7修改方式如下: # lsb_release -a  --查看系统版本-CentOS Linux release 7.6 # timedatectl     --查看当前系统时区# ls ...

  10. 百度富文本编辑器整合fastdfs文件服务器上传

    技术:springboot+maven+ueditor   概述 百度富文本整合fastdfs文件服务器上传 详细 代码下载:http://www.demodashi.com/demo/15008.h ...