Skip to content

Instantly share code, notes, and snippets.

@ometa
Forked from antonbabenko/curl_all.sh
Last active September 27, 2023 20:38
Show Gist options
  • Save ometa/23e339a90afc988226e6e2649d04c959 to your computer and use it in GitHub Desktop.
Save ometa/23e339a90afc988226e6e2649d04c959 to your computer and use it in GitHub Desktop.
Curl list of urls and save http response code & times (useful for cache warmup)
#!/bin/bash
[ ! $1 ] && echo "you must include a file containing urls, one per line" && exit 1
while read LINE; do
curl -o /dev/null --silent --progress-bar --head --write-out '%{http_code} %{time_starttransfer} %{url_effective}\n' "$LINE"
done < $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment