Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ping with timestamp

ping -w 5000 -t -l 4000 -4 localhost|cmd /q /v /c "(pause&pause)>nul &for /l %a in () do (for /f "delims=*" %a in ('powershell get-date -format "{ddd dd-MMM-yyyy HH:mm:ss}"') do (set datax=%a) && set /p "data=" && echo([!datax!] - !data!)&ping -n 2 localhost>nul"
Comment

Ping with Timestamps

@echo off

set /p host=host Address: 
set logfile=Log_%host%.log

echo bmycaspian.com = %host% >%logfile%
for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A>>%logfile% && GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 ') do (
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%logfile%
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A
    timeout 1 >NUL 
    GOTO Ping)
	
Comment

PREVIOUS NEXT
Code Example
Shell :: add and remove users in Linux 
Shell :: how to install imagemagick in linux 
Shell :: wsl screen permission denied 
Shell :: google translate for linux 
Shell :: how to install gnu lib tool 
Shell :: how to set default editor in git 
Shell :: discord.py install 
Shell :: docker node alpine 
Shell ::  
Shell :: default pem file permissions 
Shell :: mount docker volume in container 
Shell :: git commands 
Shell :: git remove file from staging 
Shell :: install virtualbox on ubuntu 
Shell :: create branch in git 
Shell :: utserver: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory 
Shell :: install kibana 7.17 ubuntu 
Shell ::  
Shell :: kubernetes command line to scale down pods 
:: signaling init process caused permission denied 
Shell :: delete all files in a directory cmd 
Shell :: git enable lfs 
Shell :: cancel rebase git 
Shell :: is ubuntu debian 
Shell :: how to cd to a folder with a space 
:: symfony install doctrine 
Shell :: how to install xdebug on Windows 
Shell :: debian backports 
:: directory current in bash 
Shell ::  
ADD CONTENT
Topic
Content
Source link
Name
5+3 =