Skip to content

Instantly share code, notes, and snippets.

@dallin
Created January 4, 2019 01:52
Show Gist options
  • Save dallin/36b988113b11d3bb2860d4f25a97e279 to your computer and use it in GitHub Desktop.
Save dallin/36b988113b11d3bb2860d4f25a97e279 to your computer and use it in GitHub Desktop.
Pings an IP address and shows red or green
echo off & cls
:top
PING -n 1 192.168.1.1 | FIND "TTL="
IF ERRORLEVEL 1 (SET OUT=4F & echo Request timed out.) ELSE (SET OUT=2F)
color %OUT%
ping -n 2 -l 10 127.0.0.1 >nul
GoTo top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment