Last active
August 26, 2021 12:42
-
-
Save mattstabeler/b430697a55c665c9137edfdfb41f634b to your computer and use it in GitHub Desktop.
A simple alias for pulling out headers for HTTP requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ]; | |
then echo "Missing url, try $0 http://example.com"; | |
else | |
curl -v -s $1 1> /dev/null | |
fi | |
## based on https://lornajane.net/posts/2014/view-only-headers-with-curl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
put it in somewhere like
~/bin/curl_headers
then make it executablechmod +x ~/bin/curl_headers
then use it like