diff options
Diffstat (limited to 'plugins-scripts/check_log.sh')
-rwxr-xr-x | plugins-scripts/check_log.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins-scripts/check_log.sh b/plugins-scripts/check_log.sh index d28c8d0a..45992687 100755 --- a/plugins-scripts/check_log.sh +++ b/plugins-scripts/check_log.sh | |||
@@ -60,8 +60,8 @@ | |||
60 | 60 | ||
61 | PATH="@TRUSTED_PATH@" | 61 | PATH="@TRUSTED_PATH@" |
62 | export PATH | 62 | export PATH |
63 | PROGNAME=`basename $0` | 63 | PROGNAME=$(basename $0) |
64 | PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` | 64 | PROGPATH=$(echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,') |
65 | REVISION="@NP_VERSION@" | 65 | REVISION="@NP_VERSION@" |
66 | 66 | ||
67 | . $PROGPATH/utils.sh | 67 | . $PROGPATH/utils.sh |
@@ -180,9 +180,9 @@ fi | |||
180 | # The temporary file that the script should use while | 180 | # The temporary file that the script should use while |
181 | # processing the log file. | 181 | # processing the log file. |
182 | if [ -x /bin/mktemp ]; then | 182 | if [ -x /bin/mktemp ]; then |
183 | tempdiff=`/bin/mktemp /tmp/check_log.XXXXXXXXXX` | 183 | tempdiff=$(/bin/mktemp /tmp/check_log.XXXXXXXXXX) |
184 | else | 184 | else |
185 | tempdiff=`/bin/date '+%H%M%S'` | 185 | tempdiff=$(/bin/date '+%H%M%S') |
186 | tempdiff="/tmp/check_log.${tempdiff}" | 186 | tempdiff="/tmp/check_log.${tempdiff}" |
187 | touch $tempdiff | 187 | touch $tempdiff |
188 | chmod 600 $tempdiff | 188 | chmod 600 $tempdiff |
@@ -191,10 +191,10 @@ fi | |||
191 | diff $logfile $oldlog | grep -v "^>" > $tempdiff | 191 | diff $logfile $oldlog | grep -v "^>" > $tempdiff |
192 | 192 | ||
193 | # Count the number of matching log entries we have | 193 | # Count the number of matching log entries we have |
194 | count=`grep -c "$query" $tempdiff` | 194 | count=$(grep -c "$query" $tempdiff) |
195 | 195 | ||
196 | # Get the last matching entry in the diff file | 196 | # Get the last matching entry in the diff file |
197 | lastentry=`grep "$query" $tempdiff | tail -1` | 197 | lastentry=$(grep "$query" $tempdiff | tail -1) |
198 | 198 | ||
199 | rm -f $tempdiff | 199 | rm -f $tempdiff |
200 | cat $logfile > $oldlog | 200 | cat $logfile > $oldlog |