Skip to content

Instantly share code, notes, and snippets.

@pedrogimenez
Forked from thetristan/diff_url
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrogimenez/e70267ab28e66a8df6f2 to your computer and use it in GitHub Desktop.
Save pedrogimenez/e70267ab28e66a8df6f2 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Diff the headers and response body of two different urls with curl
NAME=`basename $0`
COMMAND="diff <(curl -is '$1') <(curl -is '$2')"
if [ $# -ne 2 ]
then
echo "Usage: $NAME <http://foobar.com> <http://bazqux.com>" 1>&2
exit 1
fi
echo "Comparing '$1' to '$2'..."
echo $COMMAND
bash -c "$COMMAND"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment