Skip to content

Instantly share code, notes, and snippets.

@a2ikm
Created August 12, 2011 07:02
Show Gist options
  • Save a2ikm/1141610 to your computer and use it in GitHub Desktop.
Save a2ikm/1141610 to your computer and use it in GitHub Desktop.
remote diff
#
# Show differences between local and remote files.
# Compared files must be at same path.
#
# Usage: rd FILENAME REMOTE_HOST
#
rd() {
FILE=$1
REMOTE=$2
ssh $REMOTE cat "`pwd`/$FILE" | diff -u - "`pwd`/$FILE"
}
@a2ikm
Copy link
Author

a2ikm commented Aug 22, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment