updated check_url_links.sh

pull/2/head
Hari Sekhon 3 years ago
parent 91fc495ffb
commit e97359436e

@ -75,12 +75,14 @@ shift || :
trap_cmd 'echo >&2'
check_bin curl
check_url_link(){
local url="$1"
if [ -n "${VERBOSE:-}" ] || [ -n "${DEBUG:-}" ]; then
echo -n "$url => "
fi
status_code="$(command curl -sSILf --retry 3 --retry-delay 2 "$url" -o /dev/null -w "%{http_code}" || :)"
status_code="$(command curl -sSILf --retry 3 --retry-delay 2 "$url" -o /dev/null -w "%{http_code}" 2>/dev/null || :)"
if [ -n "${VERBOSE:-}" ] || [ -n "${DEBUG:-}" ]; then
echo "$status_code"
else

Loading…
Cancel
Save