1,连续ping百度一百次,统计fail的次数
@echo off set false=0 for /l %%i in (0,1,5) do ( if %%i LEQ 100 ( ping www.baidu.com > nul if not %errorlevel% EQU 0 set /a false = false + 1 ) ) echo 总共失败了%false%次
2,连续ping一组IP,并打印访问情况
时间: 2024-10-07 19:17:40
1,连续ping百度一百次,统计fail的次数
@echo off set false=0 for /l %%i in (0,1,5) do ( if %%i LEQ 100 ( ping www.baidu.com > nul if not %errorlevel% EQU 0 set /a false = false + 1 ) ) echo 总共失败了%false%次
2,连续ping一组IP,并打印访问情况