一个简单的检查网址返回信息的脚本
2018-07-23 本文已影响0人
HelloWorld_26
#!/bin/bash
gid=$1
version=$2
if [ $1 == 200 ]||[ $1 == 201 ]||[ $1 == 202 ]||[ $1 == 203 ];then
curl http://IP:Port/notice/v1/getnotice?gid=$1\&version=$2
echo "------------------------------------------------notice地址为:"
echo "http://IP:Port/notice/v1/getnotice?gid=$1\&version=$2"
elif [ $1 == 205 ];then
curl http://IP:Port/notice/v1/getnotice?gid=$1\&version=$2
echo "------------------------------------------------notice地址为:"
echo "http://IP:Port/notice/v1/getnotice?gid=$1\&version=$2"
fi
( curl的链接为自己服务的链接,企业IP和端口较为隐私此处隐去 )