标签: shell
判断ssh是否运行
12345678#!/bin/bash
service=$( systemctl is-active sshd )
if [ "$service" == active ];then
echo "$service is running"
else
sys……
正则表达式和扩展正则的使用方法
123456789101112131415161718192021222324252627282930313233343536373839404142434445正则表达式是一种用来匹配和处理文本的工具,而扩展正则(Extended Regu……
SHELL 脚本 PING主机并进行ssh免密操作
12345678910111213141516171819202122232425262728#!/bin/env bash
home_dir=/home/yunwei
#判断yunwei账号的秘钥是否存在
[ ! -f $home_dir/.ssh/id_rsa.……