Skip to content

Instantly share code, notes, and snippets.

View cscharff's full-sized avatar

Chris Scharff cscharff

  • Ten Lions
  • Austin, TX
View GitHub Profile
@thetristan
thetristan / diff_url
Created August 6, 2013 21:57
Compare two URLs (headers and response body) with curl: $ diff_url http://foobar.com http://bazqux.com
#!/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