Created
August 26, 2019 15:22
-
-
Save okhlybov/78899b6064971629310af81f543322c2 to your computer and use it in GitHub Desktop.
(ba)sh function to generate a patch between $dir and $dir.orig subdirectories found in current directory
This file contains hidden or 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
# (ba)sh function to generate a patch between $dir and $dir.orig subdirectories found in current directory | |
2diff() { | |
orig=`find . -maxdepth 1 -type d -and \( -name '*.org' -or -name '*.orig' \) -printf '%P'` | |
base=`echo $orig | sed 's/\.\(org\|orig\)$//'` | |
LANG=C diff -urN $orig $base | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment