1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-18 06:03:07 -07:00
rc/sh/isup
2014-11-12 20:37:04 -08:00

8 lines
135 B
Bash

#!/usr/bin/zsh
isup() {
local c
curl -sLI -w '%{http_code}' -o /dev/null "$1" | read -r c
[ "${c:0:1}" -eq 2 ]
}
isup "$@"