Skip to content

Instantly share code, notes, and snippets.

@etoews etoews/
Last active Apr 12, 2017

What would you like to do?
remote-diff: a bash function to diff a local file with a remote file
# Usage: remote-diff foo.yaml
# Note: It ignores lines that begin with a '#' (comments)
function remote-diff()
FILENAME=$(basename ${FILE})
wget --quiet ${REMOTE_FILE} --output-document ${TMP_FILE}
diff --ignore-matching-lines ^# ${FILE} ${TMP_FILE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.