Skip to content

Instantly share code, notes, and snippets.

@a2ikm
Created August 12, 2011 07:02
Show Gist options
  • Select an option

  • Save a2ikm/1141610 to your computer and use it in GitHub Desktop.

Select an option

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

a2ikm commented Aug 22, 2011

Copy link
Copy Markdown
Author

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