Created
September 20, 2016 11:37
-
-
Save ftnk/eff29d60cac28b5fb91cab8a6b5297d9 to your computer and use it in GitHub Desktop.
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
--- plugins-scripts/check_log.sh.dist 2016-09-13 16:24:39.057127354 +0900 | |
+++ plugins-scripts/check_log.sh 2016-09-13 16:25:22.990439291 +0900 | |
@@ -202,13 +202,13 @@ | |
chmod 600 $tempdiff | |
fi | |
-diff $logfile $oldlog | grep -v "^>" > $tempdiff | |
+diff $logfile $oldlog | egrep -v "^>" > $tempdiff | |
# Count the number of matching log entries we have | |
-count=`grep -c "$query" $tempdiff` | |
+count=`egrep -c "$query" $tempdiff` | |
# Get the last matching entry in the diff file | |
-lastentry=`grep "$query" $tempdiff | tail -1` | |
+lastentry=`egrep "$query" $tempdiff | tail -1` | |
rm -f $tempdiff | |
cat $logfile > $oldlog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment