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 :: minikube start with docker driver 
Shell :: how to set execute permission in linux 
Shell :: ssh vs gpg keys 
Shell :: check current branch github 
Shell :: sudo: effective uid is not 0 
Shell :: auth token 
Shell :: install laravel globally mac 
Shell :: Accessors are only available when targeting ECMAScript 5 and higher. 
Shell :: flutter ci cd gitlab 
Shell :: powershell http request 
Shell :: createa. branch off of development git 
Shell :: ubuntu chrome 
Shell :: set multiple git username and password 
Shell :: rm directory ubuntu 
Shell :: enable rpm fusion 
Shell :: tasksel: apt-get failed (100) 
Shell :: git push specific ssh key 
Shell :: install fdupes duplicate content finder on linux 
Shell :: docker remove all images powershell 
Shell :: public key generate 
Shell :: install ionic 6 
Shell :: kill port 3000 ubuntu 
Shell :: git SSL certificate problem: self signed certificate 
Shell :: Grant Htaccess to all directory 
Shell :: check time in linux 
Shell :: how to check if your linux Server Is Under DDoS Attack 
Shell :: linux rename multiple files 
Shell :: set origin url git 
Shell :: undo git rebase 
Shell :: pacman uninstall 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =