2025年少儿编程机构选择指南 - 品牌测评鉴赏家
2025/12/20 0:05:18
此脚本pingnodes.ksh的主要目的是对一系列节点进行Ping检测,并在发现无法访问的节点时发送邮件通知。以下是脚本的完整内容:
#!/usr/bin/ksh # # # SCRIPT: pingnodes.ksh # # AUTHOR: Randy Michael # # DATE: 02-20-2001 # # PURPOSE: This script is used to ping a list of nodes and # send email notification (or alphanumeric page) of any unreachable # nodes. # # # REV: 1.0.A # # REV.LIST: # # # set -x # Uncomment to debug this script # set -n # Uncomment to check command syntax without any execution # ####################################################### # Set a trap and clean up before a trapped exit... # REMEMBER: you CANNOT trap “kill -9” trap ‘echo “\n\nExiting on trapped signal...\n” \ ;exit 1’ 1 2 3 15 ################################