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. Vector源码分析和实例应用

    1.Vector介绍 Vector 是矢量队列,它是JDK1.0版本添加的类.继承于AbstractList,实现了List, RandomAccess, Cloneable这些接口. Vector ...

  2. SQL 关联外键报错类型不匹配

    如题,关联外键的时候,报错类型匹配.但是两个 类型都是int sql 如下: CREATE TABLE IF NOT EXISTS `alert_receiver_map` ( `id` INT UN ...

  3. 单向LSTM笔记, LSTM做minist数据集分类

    单向LSTM笔记, LSTM做minist数据集分类 先介绍下torch.nn.LSTM()这个API 1.input_size: 每一个时步(time_step)输入到lstm单元的维度.(实际输入 ...

  4. Vue(十六)vue-router路由

    一. vue-router路由   1. 简介 使用Vue.js开发SPA(Single Page Application)单页面应用 根据不同url地址,显示不同的内容,但显示在同一个页面中,称为单 ...

  5. Using async-await on .net 4

    I'm currently starting to create an application that would profit a lot from C# 5's async-await feat ...

  6. Ubuntu远程连接MySQL(connection refused)解决方法

    一.判断ubuntu是否开启防火墙 sudo ufw status 开放防火墙3306端口 sudo ufw allow 3306 二.查看3306端口是否打开  注意:红色框框表示3306绑定的ip ...

  7. SSE图像算法优化系列七:基于SSE实现的极速的矩形核腐蚀和膨胀(最大值和最小值)算法。

    因未测试其他作者的算法时间和效率,本文不敢自称是最快的,但是速度也可以肯定说是相当快的,在一台I5机器上占用单核的资源处理 3000 * 2000的灰度数据用时约 20ms,并且算法和核心的大小是无关 ...

  8. MyBatis中使用实体中使用枚举,数据库中使用数值

    一.简介 本文主要讲MyBatis中使用实体中使用枚举,数据库中使用数值的解决方案.正常直接使用会报错,需要添加typeHandlers在mybatis-config.xml中. 二.解决方案 如下: ...

  9. Android编码学习之Adapter

    1. Apter的作用 Adapter是将数据绑定到UI界面上的桥接类.Adapter负责创建显示每个项目的子View和提供对下层数据的访问.Adapter的作用就是将要在列表内显示的数据和列表本身结 ...

  10. C# 调用线程并行上下文穿透-ILogicalThreadAffinative+CallContext

    na mespace System.Runtime.Remoting.Messaging { /// <summary>Provides a set of properties that ...