Created
January 26, 2010 11:53
-
-
Save eightbitraptor/286774 to your computer and use it in GitHub Desktop.
A naive way of diffing 2 files on seperate servers
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
#!/bin/bash | |
path1=`echo $1 | awk -F, '{print $1}'`/$2 | |
path2=`echo $1 | awk -F, '{print $2}'`/$2 | |
if `curl -Ss $path1 | file - | grep text`; then | |
diff <(curl -Ss $path1) <(curl -Ss $path2) | |
else | |
diff <(curl -Ss $path1 | md5) <(curl -Ss $path2 | md5) | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment