check_log.sh: [ShellCheck](http://www.shellcheck.net/) fails (#1366)
waja
notifications at github.com
Mon Oct 5 12:12:12 CEST 2015
Running '$ shellcheck plugins-scripts/check_log.sh' results into the
following result:
In plugins-scripts/check_log.sh line 61:
PATH="@TRUSTED_PATH@"
^-- SC2123: PATH is the shell search path. Use another name.
In plugins-scripts/check_log.sh line 63:
PROGNAME=`basename $0`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 64:
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 67:
. $PROGPATH/utils.sh
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 76:
print_revision $PROGNAME $REVISION
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 90:
exit $STATE_UNKNOWN
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 103:
exit $STATE_OK
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 107:
exit $STATE_OK
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 110:
print_revision $PROGNAME $REVISION
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 111:
exit $STATE_OK
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 114:
print_revision $PROGNAME $REVISION
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 115:
exit $STATE_OK
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 152:
exit $STATE_UNKNOWN
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 160:
if [ ! -e $logfile ]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 162:
exit $STATE_UNKNOWN
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 163:
elif [ ! -r $logfile ] ; then
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 165:
exit $STATE_UNKNOWN
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 172:
if [ ! -e $oldlog ]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 173:
cat $logfile > $oldlog
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 175:
exit $STATE_OK
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 183:
tempdiff=`/bin/mktemp /tmp/check_log.XXXXXXXXXX`
^-- SC2006: Use $(..) instead of legacy `..`.
In plugins-scripts/check_log.sh line 185:
tempdiff=`/bin/date '+%H%M%S'`
^-- SC2006: Use $(..) instead of legacy `..`.
In plugins-scripts/check_log.sh line 187:
touch $tempdiff
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 188:
chmod 600 $tempdiff
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 191:
diff $logfile $oldlog | grep -v "^>" > $tempdiff
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 194:
count=`grep -c "$query" $tempdiff`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 197:
lastentry=`grep "$query" $tempdiff | tail -1`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 199:
rm -f $tempdiff
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 200:
cat $logfile > $oldlog
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In plugins-scripts/check_log.sh line 210:
exit $exitstatus
^-- SC2086: Double quote to prevent globbing and word splitting.
--
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/issues/1366
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20151005/964e36bf/attachment.html>
More information about the Devel
mailing list