Skip to content

Instantly share code, notes, and snippets.

@Boldewyn
Created April 21, 2020 13:38
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 Boldewyn/c03ffc3f82afdfd23643ecbb4e4119ae to your computer and use it in GitHub Desktop.
Save Boldewyn/c03ffc3f82afdfd23643ecbb4e4119ae to your computer and use it in GitHub Desktop.
#!/bin/bash
set -euo pipefail
FIRST="${1:-}"
SECOND="${2:-}"
CURL="curl"
CURL_FLAGS="${CURL_FLAGS:--sSki}"
if [[ ! $FIRST || ! $SECOND || $FIRST == --help ]]; then
cat <<USAGE
usage: $(basename "$0") URL URL
Do a vimdiff on the cURL result for both given URLs.
USAGE
exit
fi
vimdiff <("$CURL" $CURL_FLAGS "$FIRST") <("$CURL" $CURL_FLAGS "$SECOND")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment