summaryrefslogtreecommitdiffstats
path: root/web/attachments/178166-check_log_patch.txt
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/178166-check_log_patch.txt')
-rw-r--r--web/attachments/178166-check_log_patch.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/web/attachments/178166-check_log_patch.txt b/web/attachments/178166-check_log_patch.txt
new file mode 100644
index 0000000..7debed7
--- /dev/null
+++ b/web/attachments/178166-check_log_patch.txt
@@ -0,0 +1,23 @@
1***************
2*** 198,207 ****
3 $DIFF $logfile $oldlog > $tempdiff
4
5 # Count the number of matching log entries we have
6! count=`$GREP -c "$query" $tempdiff`
7
8 # Get the last matching entry in the diff file
9! lastentry=`$GREP "$query" $tempdiff | $TAIL --lines=1`
10
11 $RM -f $tempdiff
12 $CAT $logfile > $oldlog
13--- 198,207 ----
14 $DIFF $logfile $oldlog > $tempdiff
15
16 # Count the number of matching log entries we have
17! count=`$GREP -c "^<.*$query" $tempdiff`
18
19 # Get the last matching entry in the diff file
20! lastentry=`$GREP "^<.*$query" $tempdiff | $TAIL --lines=1`
21
22 $RM -f $tempdiff
23 $CAT $logfile > $oldlog