Permalink
Browse files

replaceMatchLine.pl - fix bug match part of the src string.

  • Loading branch information...
1 parent f85fe78 commit 53eaca6b1e0ba230b63492fdbb7c1343e42001ae @soarpenguin committed Feb 16, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 replaceMatchLine.pl
View
2 replaceMatchLine.pl
@@ -63,7 +63,7 @@ sub replace {
`fgrep "${orig}" ${dest} &>/dev/null`;
if($? eq 0) {
- `sed -e "s/${orig}/${rep}/" ${dest} >${dest}.tmp`;
+ `sed -e "s/\<${orig}\>/${rep}/" ${dest} >${dest}.tmp`;
`mv ${dest}.tmp ${dest}`;
} else {
print "Mismatch the line of $orig\n";

0 comments on commit 53eaca6

Please sign in to comment.