From: Daniel Kahn Gillmor Date: Mon, 25 Oct 2010 20:20:23 +0000 (-0400) Subject: ensure that we only remove fully-matching lines once we have found them X-Git-Tag: monkeysphere_0.34-1~1^2~2 X-Git-Url: http://git.tremily.us/?p=monkeysphere.git;a=commitdiff_plain;h=52b5254120e8140ef72277408f8ba1f6addd1cf7 ensure that we only remove fully-matching lines once we have found them --- diff --git a/src/share/common b/src/share/common index a6da309..4915923 100644 --- a/src/share/common +++ b/src/share/common @@ -346,7 +346,7 @@ remove_line() { log debug "removing matching key lines..." tempfile=$(mktemp "${file}.XXXXXXX") || \ failure "Unable to make temp file '${file}.XXXXXXX'" - grep -v -F "$lines" "$file" >"$tempfile" + grep -v -x -F "$lines" "$file" >"$tempfile" mv -f "$tempfile" "$file" fi }