当前位置: 首页 > news >正文

个人如何办网站wordpress4.9标签404

个人如何办网站,wordpress4.9标签404,兰州新站点seo加盟,四川成都设计院实战演练 本节将展示一个实用脚本,该脚本在处理用户输入的同时,使用 ping 命令或 ping6 命令来测试与其他网络主机的连通性。 ping 命令或 ping6 命令可以快速测试网络主机是否可用。这个命令很有用,经常作为首选工具。如果只是检查单个主机&…

实战演练
本节将展示一个实用脚本,该脚本在处理用户输入的同时,使用 ping 命令或 ping6 命令来测试与其他网络主机的连通性。
ping 命令或 ping6 命令可以快速测试网络主机是否可用。这个命令很有用,经常作为首选工具。如果只是检查单个主机,那么直接使用该命令即可。
但是如果有数个甚至数百个主机需要检查,则 shell 脚本可以助你一臂之力。

这个脚本通过两种方法来选择要检查的主机:一是使用命令行选项,二是使用文件。下面是
该脚本在 Ubuntu 系统中使用命令行选项的用法演示:

$ ./CheckSystems.sh -t IPv4 192.168.1.102 192.168.1.104 
Checking system at 192.168.1.102... 
[...] 
--- 192.168.1.102 ping statistics --- 
3 packets transmitted, 3 received, 0% packet loss,[...] 
Checking system at 192.168.1.104... 
[...] 
--- 192.168.1.104 ping statistics --- 
3 packets transmitted, 0 received, +3 errors, 100% packet loss,[...] 
$


如果没有指定 IP 地址参数,则脚本会提示用户并退出:

$ ./CheckSystems.sh -t IPv4 
IP Address(es) parameters are missing. 
Exiting script... 
$$ cat CheckSystems.sh 
#!/bin/bash 
# Check systems on local network allowing for 
# a variety of input methods. 
# 
# 
########### Determine Input Method ################### 
# 
# Check for command-line options here using getopts. 
# If none, then go on to File Input Method 
# 
while getopts t: opt 
do case "$opt" in t) # Found the -t option if [ $OPTARG = "IPv4" ] then pingcommand=$(which ping) #elif [ $OPTARG = "IPv6" ] then pingcommand=$(which ping6) # else echo "Usage: -t IPv4 or -t IPv6" echo "Exiting script..." exit fi ;; *) echo "Usage: -t IPv4 or -t IPv6" echo "Exiting script..." exit;; esac # shift $[ $OPTIND - 1 ] # if [ $# -eq 0 ] then echo echo "IP Address(es) parameters are missing." echo echo "Exiting script..." exit fi # for ipaddress in "$@" do echo echo "Checking system at $ipaddress..." echo $pingcommand -q -c 3 $ipaddress echo done exit 
done 
# 
########### File Input Method ################### 
# 
echo 
echo "Please enter the file name with an absolute directory reference..." 
echo 
choice=0 
while [ $choice -eq 0 ] 
do read -t 60 -p "Enter name of file: " filename if [ -z $filename ] then quitanswer="" read -t 10 -n 1 -p "Quit script [Y/n]? " quitanswer #case $quitanswer in Y | y) echo echo "Quitting script..." exit;; N | n) echo echo "Please answer question: " choice=0;; *) echo echo "No response. Quitting script..." exit;; esac else choice=1 fi 
done 
# 
if [ -s $filename ] && [ -r $filename ] 
then echo "$filename is a file, is readable, and is not empty." echo cat $filename | while read line do ipaddress=$line read line iptype=$line if [ $iptype = "IPv4" ] then pingcommand=$(which ping) else pingcommand=$(which ping6) fi echo "Checking system at $ipaddress..." $pingcommand -q -c 3 $ipaddress echo done echo "Finished processing the file. All systems checked." 
else echo echo "$filename is either not a file, is empty, or is" echo "not readable by you. Exiting script..." 
fi 
# 
#################### Exit Script ##################### 
# 
exit 
$


 

http://www.yayakq.cn/news/463218/

相关文章:

  • 阿里云 域名 做网站冯提莫斗鱼前在哪个网站做直播
  • 蓝色科技企业网站模板爱前端wordpress5.0.3主题
  • 网站线框图用什么做网站开发技术课程设计说明书
  • 网站建设明细报价单wordpress 媒体库 显示
  • 建筑业务网站建设云南网站建设找天软
  • 网站建设活动wordpress添加弹窗
  • 门户手机网站开发体育网站建设规划
  • 有哪些建设工程类网站网站 建设 步骤是
  • 绩溪住房建设网站wordpress美化下载页面
  • 房地产网页设计网站建设大连网站设计哪个最好
  • vs中做网站设置背景图片多屏合一网站建设
  • 网站建设需要购买服务器么盛盾科技网站建设
  • .win域名做网站怎么样网页前端设计师培训学校
  • 中山建站装饰设计的变形手法有哪些
  • 东莞网站建没如何用 ftp上传网站
  • 如何在网站做引流凡科app制作
  • 壹搜网站建设网络营销的主要方式和技巧
  • 产品包装设计公司网站大数据下的精准营销
  • 化妆品企业网站建设的缺点网站源码下载后怎么用
  • 中国广告网站电子商务旅游网站建设策划书
  • 陕西省门户网站建设政策网站建设代码介绍
  • 网站优化有哪些类型中国铁路建设投资公司网站熊学军
  • 杭州富阳区网站建设公司电子商务网站设计岗位主要是?
  • 链接推广外贸网站建设及优化ppt
  • 旅游公共信息服务网站建设及服务质量标准巴彦淖尔网站制作
  • 织梦网站仿站企业网站营销典型案例
  • 大连html5开发镇江整站优化
  • 网站备案 超链接学校网站资源建设方案
  • 做网站的风险分析网站制作上网
  • 网站商城互联网营销师就业前景