当前位置:网站首页>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
....
边栏推荐
- Figure what are the uses and applications of neural networks?
- What financial product does the new bond belong to?
- KunlunDB查询优化(三)排序下推
- Because I said: volatile is a lightweight synchronized, the interviewer asked me to go back and wait for the notice!
- Is Ruida futures safe? What are the procedures for opening futures accounts? How to reduce the futures commission?
- What is the storage structure and mode of data in the database?
- Kunlun distributed database technology advantages
- 最安全的现货白银的心理分析
- EasyCVR使用RTMP推流时不显示界面如何解决?
- Is it reliable to get new debts? Is it safe?
猜你喜欢
![[go] go modules GETTING STARTED](/img/0a/58c50bb624c91b88a88aea280aa650.jpg)
[go] go modules GETTING STARTED

Typecho imitation of Lu Songsong's blog theme template / Technology Information blog theme template

KunlunDB备份和恢复

华为云招募工业智能领域合作伙伴,强力扶持+商业变现

权限想要细化到按钮,怎么做?
声网多人视频录制与合成支持掉线再录制 | 掘金技术征文

數據庫中數據的儲存結構和方式是什麼?

How to get started with machine learning?

I've been outsourcing for four years, but I feel it's useless

TIDB监控升级解决panic的漫漫探索之路
随机推荐
为什么大家很少使用外键了?
Figure what are the uses and applications of neural networks?
Some thoughts about the technology of test / development programmers are very advanced, and they can't go on
Which brokerage platform is better and safer for a brokerage to open an account on a mobile phone? What if you need a low commission
c# sqlsugar,hisql,freesql orm框架全方位性能测试对比 sqlserver 性能测试
How Huawei cloud implements a global low delay network architecture for real-time audio and video [Part 1]
What financial product does the new bond belong to?
a++,++a,!,~
Various schemes for lazy loading of pictures
【滑动窗口】leetcode992. Subarrays with K Different Integers
【GO】go语言interface
Is it reliable to get new debts? Is it safe?
如何入门机器学习?
TiDB VS MySQL
Package management tools --npm, -cnpm, -yan, -cyarn
最安全的现货白银的心理分析
[go] getting started with go modules
Sword finger offer 11 Minimum number of rotation array
KunlunDB查询优化(三)排序下推
[go] go modules GETTING STARTED