当前位置:网站首页>Shell 查看帮助
Shell 查看帮助
2022-06-23 00:35:00 【ghostwritten】
Shell 查看帮助
文章目录
Shell 脚本添加查看帮助,让他人更容易看懂理解。
1
help()
{
header
echo
echo 'Usage: cckiller [OPTIONS] [N]'
echo 'N : number of tcp/udp connections (default 100)'
echo
echo 'OPTIONS:'
echo "-h | --help: Show this help screen"
echo "-k | --kill: Block the offending ip making more than N connections"
echo '-s | --show: Show The TOP "N" Connections of System Current'
echo "-b | --banip: Ban The IP or IP subnet like cckiller -b 192.168.1.1"
echo "-u | --unban: Unban The IP or IP subnet which is in the BlackList of iptables"
echo
}
if [ $# -lt 2 ]; then
help
fi
2
# Notes:
# - Please install "jq" package before using this driver.
usage() {
err "Invalid usage. Usage: "
err "\t$0 init"
err "\t$0 mount <mount dir> <json params>"
err "\t$0 unmount <mount dir>"
exit 1
}
err() {
echo -ne $* 1>&2
}
...
if [ $# -lt 2 ]; then
usage
fi
....
边栏推荐
猜你喜欢

每日刷题记录 (一)

Typecho仿卢松松博客主题模板/科技资讯博客主题模板

Isolation level of transaction system

Oracle ASM使用asmcmd中的cp命令来执行远程复制

数据库中数据的储存结构和方式是什么?
Because I said: volatile is a lightweight synchronized, the interviewer asked me to go back and wait for the notice!
声网多人视频录制与合成支持掉线再录制 | 掘金技术征文

【首发】请求一下子太多了,数据库危

【GO】Go Modules入門
#yyds干货盘点#尾递归比递归好在哪儿
随机推荐
[go] go polymorphism
ECMAScript6新特性
ES5 Object的扩展方法//call、apply 和 bind
[go] go language interface
[go] go modules GETTING STARTED
DCC888 :SSA (static single assignment form)
SAP UI5 应用开发教程之一百零二 - SAP UI5 应用的打印(Print)功能实现详解
【GO】go多态
华为云招募工业智能领域合作伙伴,强力扶持+商业变现
打新债属于什么理财产品?
Is it safe to open a new bond? How
MGRE环境下的OSPF实验
打新债到底靠不靠谱呀?是不是安全的?
SAP MM ME27 创建公司内STO单
MD5 encryption + salt value tool class
Es5 object extension methods //call, apply and bind
如何使用enum数据类型
软件构造课程ADT与OOP理解
a++,++a,!,~
一文简述:钓鱼攻击知多少