Skip to content

Instantly share code, notes, and snippets.

@IlanVivanco
Last active March 30, 2023 15:26
Show Gist options
  • Save IlanVivanco/582fbc47e3f9290fe8ea64fb2e6c8788 to your computer and use it in GitHub Desktop.
Save IlanVivanco/582fbc47e3f9290fe8ea64fb2e6c8788 to your computer and use it in GitHub Desktop.
CURL operations
while read line; do awk '{print $2}' <(curl -ISs $line | grep location) >> headers.txt; done < urls.txt
tr -d '\r' < urls.txt | xargs -n 1 curl -X HEAD -i
tr -d '\r' < urls.txt | xargs -n 1 echo | xargs -n 1 curl -LI -o /dev/null -s -w '%{http_code}: %{url_effective}\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment