• cmd循环ping 保存为日期时间日志文件


    mode con cols=100 lines=5
    color 47
    @echo off
    
    set ip=192.168.188.254
    
    set datevar=%date:~0,4%-%date:~5,2%-%date:~8,2%
    set timevar=%time:~0,2%
    if /i %timevar% LSS 10 (
        set timevar=0%time:~1,1%
    )
    
    set timevar=%timevar%:%time:~3,2%:%time:~6,2%
    @echo  ping  %ip%    %datevar% %timevar%
    for /l %%i in (1,1,%999999999%) do (
        @echo %datevar% %timevar% >>%ip%_%datevar%.log 
    ping %ip%>>%ip%_%datevar%.log
    
    )
  • 相关阅读:
    Shell IFS
    Crontab
    linux awk
    free
    条件语句练习2
    条件语句练习
    打印菜单
    条件测试语法
    read 命令
    jQuery(实例)
  • 原文地址:https://www.cnblogs.com/zhouein/p/15160409.html
Copyright © 2020-2023  润新知