blob: 7debed74baac0cce304d3225d166af6156fb1f68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
***************
*** 198,207 ****
$DIFF $logfile $oldlog > $tempdiff
# Count the number of matching log entries we have
! count=`$GREP -c "$query" $tempdiff`
# Get the last matching entry in the diff file
! lastentry=`$GREP "$query" $tempdiff | $TAIL --lines=1`
$RM -f $tempdiff
$CAT $logfile > $oldlog
--- 198,207 ----
$DIFF $logfile $oldlog > $tempdiff
# Count the number of matching log entries we have
! count=`$GREP -c "^<.*$query" $tempdiff`
# Get the last matching entry in the diff file
! lastentry=`$GREP "^<.*$query" $tempdiff | $TAIL --lines=1`
$RM -f $tempdiff
$CAT $logfile > $oldlog
|