![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shell
xiaoping_1988
架构师
展开
-
telnet批量检测IP端口的网络连通性
检测单个ip端口的shell脚本:telnet_one.ship=$1port=$2timeoutSec=5echo -e '\x1dclose\x0d' | timeout --signal=9 $timeoutSec telnet $ip $portecho "$ip:$port,$?" >> result.txt批量检测ip端口的shell脚本:telnet_all.shipfile=$1curpath=$(readlink -f "$(dirname "$0")")l原创 2022-03-23 10:34:58 · 5597 阅读 · 1 评论 -
telnet成功或者超时自动退出
# timout_second:超时时间,秒# host: 域名# port: 端口echo -e '\x1dclose\x0d' | timeout --signal=9 {timout_second} telnet {host} {port}原创 2021-08-16 20:05:54 · 8152 阅读 · 1 评论 -
用-或者--传参的shell
用-或者--传参的shell,shell脚本导出hive表原创 2017-09-16 18:21:16 · 257 阅读 · 0 评论 -
shell字符串转日期,日期转字符串,判断字符串包含某个字符串,删除某个目录下的几天前的日志文件
shell字符串转日期,日期转字符串,判断字符串包含某个字符串,删除某个目录下的几天前的日志文件原创 2017-12-27 19:04:59 · 22522 阅读 · 1 评论