!/bin/bash
read -p "Input your file direction(Dont‘t use "tab".):" file
perl -ne ‘s/(\d+\.\d+\.\d+\.\d+)/print $1,"\n"/eg‘ $file > /home/deploy/lilongji/ip_list2
cat ip_list2 | while read iplist;
do
ssh -n $iplist hostname;
done
远程登录操作
时间: 2024-10-12 09:04:13