Created
August 12, 2011 07:02
-
-
Save a2ikm/1141610 to your computer and use it in GitHub Desktop.
remote diff
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
# | |
# 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" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use https://gist.github.com/1154301