Skip to content

Instantly share code, notes, and snippets.

@fsvehla
Created January 24, 2013 16:23
Show Gist options
  • Save fsvehla/4624287 to your computer and use it in GitHub Desktop.
Save fsvehla/4624287 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
difftool=diff
[[ -f /usr/local/bin/ksdiff ]] && difftool=ksdiff
lname=$(echo $1 | tr '/' '-')
rname=$(echo $2 | tr '/' '-')
lpath=/tmp/${lname}-$$-$RANDOM.json
rpath=/tmp/${rname}-$$-$RANDOM.json
cat $1 | jq '.' > $lpath
cat $2 | jq '.' > $rpath
$difftool $lpath $rpath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment