欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

阿里云添加路由的Windows批處理文件

 更新時間:2016年11月02日 11:05:48   作者:深藍(lán)醫(yī)生  
今天小編發(fā)現(xiàn)一段很好的學(xué)習(xí)bat程序的示例代碼,特此分享到腳本之家平臺,供大家參考

發(fā)現(xiàn)一段很好的學(xué)習(xí)bat程序的示例代碼,分享給大家,具體代碼如下:

@echo off
route print -4 "10.0.0.0" | find "10.0.0.0" > route_list
set gw=
for /F "tokens=1-5" %%a in ('type route_list') do (
 if not "%%c" == "" ( set gw=%%c )
)
if "%gw%" == "" ( echo "fail to get eth0 default gw" && goto error)
route print -4 100.64.0.0 | find "%gw%" > NUL
if not "%errorlevel%" == "0" (
  route -p add 100.64.0.0 mask 255.192.0.0 %gw% > NUL 2>&1
)
if not "%errorlevel%" == "0" ( echo "faild to add route 100.64.0.0/10" && goto error)
:success
del route_list
echo "add 100.64.0.0/10 success !"
timeout 10
exit 0
:error
timeout 10
exit 1

以上所述是小編給大家介紹的阿里云添加路由的Windows批處理文件,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評論