Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

一个简单的检测网络Shell脚本

$
0
0

原创内容,转载请注明出处: http://www.myzhenai.com.cn/post/2309.html http://www.myzhenai.com/thread-17923-1-1.html

关键词: Shell判断变量是否为空 Shell判断参数是否为空 Shell检测网络 Shell ping Shell traceroute


一个简单的检测网络Shell脚本

Shell ping Shell traceroute


一个简单的检测网络Shell脚本

Shell ping Shell traceroute

其实这个Shell脚本就是简单的将ping和traceroute集合在一起. 因为我总是会忘记traceroute的拼法.

# !/bin/bash
##############################################################################################################################################
# This is the Network detection script tool
# Author: Ruclinux 海南胡说 海南仙岛
# Website: www.myzhenai.com www.myzhenai.com.cn www.haikou-china.com jiayu.mybabya.com www.0898-shop.com
##############################################################################################################################################
if [ ! -n $1 ];then
echo "You did not enter a URL or IP"
else
p=`ping -c 5 $1`
echo -e "$p\n"
t=`traceroute $1`
echo -e "$t\n"
fi sicnature ---------------------------------------------------------------------

Your current IP address is: 122.10.119.206

Your IP address location: 香港特别行政区

Your IP address country and region: 中国香港特区||

Your current browser is:Your current system is: Original content, please indicate the source:

同福客栈论坛 |海南仙岛 | 海南乡情论坛 | JiaYu Blog

sicnature ---------------------------------------------------------------------

Welcome to reprint. Please indicate the source http://www.myzhenai.com.cn/post/2309.html

Tags:linux, ping , shell , traceroute

This entry was posted on 星期五, 九月 9th, 2016 at 1:33 上午 and is filed underLinux. You can follow any responses to this entry through theRSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.


Viewing all articles
Browse latest Browse all 11063

Trending Articles