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
# I want to keep THEIR version when there is a conflict | |
# Copy their version over ours and report success | |
cp -f $3 $2 | |
exit 0 |
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
# I want to keep MY version when there is a conflict | |
# Nothing to do: %A (the second parameter) already contains my version | |
# Just indicate the merge has been successfully "resolved" with the exit status | |
exit 0 |
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
grep -Rl "SEARCH" . | while read FILE; do (echo "g/LINE/d"; echo 'wq') | ex -s FILE; done |
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
grep -Rl "SEARCH" . | while read FILE; do sed -i "" "/LINE/d" $FILE; done | |
grep -Rl "SEARCH" . | while read FILE; do sed "/LINE/d" $FILE > tmp; mv tmp $FILE ; done |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'tlsmail' | |
msg=<<EOF | |
From: Test Sender <[email protected]> | |
To: Test Recipient <[email protected]> | |
Subject: test |
NewerOlder