Skip to content

Instantly share code, notes, and snippets.

@fu-sen
Created November 9, 2024 09:59
Show Gist options
  • Save fu-sen/1042936b8b381669aa3f93b333af174e to your computer and use it in GitHub Desktop.
Save fu-sen/1042936b8b381669aa3f93b333af174e to your computer and use it in GitHub Desktop.
Display web status in Windows CMD (Status page replacement) | コマンド プロンプト で Web ステータス表示 (sテータスページの代わり)
@echo off
setlocal
:loop
echo %DATE% %TIME%
echo;
for /f %%u in (status.txt) do (
echo %%u
curl.exe %%u -o NUL -w "%%{http_code} %%{errormsg}\n\n" -s
)
timeout /t 3600 /nobreak >nul
cls
goto loop
@echo off
setlocal
for /f %%u in (status.txt) do (
echo %%u
curl.exe %%u -o NUL -w "%%{http_code} %%{errormsg}\n\n" -s
)
endlocal
pause
https://example.com/
https://example.net/
https://example.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment