xml地图|网站地图|网站标签 [设为首页] [加入收藏]

您的位置:亚洲必赢 > 计算机尝试 > 【亚洲必赢手机app】阿里批处理,阿里云添加路

【亚洲必赢手机app】阿里批处理,阿里云添加路

发布时间:2019-06-03 21:21编辑:计算机尝试浏览(100)

    【亚洲必赢手机app】阿里批处理,阿里云添加路由的Windows批处理文件。意识一段很好的求学bat程序的示范代码,分享给大家,具体代码如下:

    Ali云增多路由的Windows批管理文件,Ali批管理

    1段很好的上学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
    

     

    一段很好的读书bat程序的示范代码,如下: @echo off route print -4"十.0.0.0" | find "十.0.0.0" rou...

    @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
    

    本文由亚洲必赢发布于计算机尝试,转载请注明出处:【亚洲必赢手机app】阿里批处理,阿里云添加路

    关键词:

上一篇:学习笔记之,MongoDB中游标的深入学习

下一篇:没有了