Created
April 21, 2020 13:38
-
-
Save Boldewyn/c03ffc3f82afdfd23643ecbb4e4119ae to your computer and use it in GitHub Desktop.
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 | |
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