[root@localhost scripts]# vim ping.sh
#!/bin/bash
set -x ##分步执行
exec &> /tmp/log.txt ##脚本执行的过程和结果导入/tmp/log.txt文件中
for ip in `seq110`
doif ! ping -c1 192.168.10.$ip ;thenecho $ip
exit
fidone
努力成为一名优秀的工程师
posted on
2019-08-08 10:54宅女士
阅读(6429)
评论(1)
编辑收藏举报