Running '$ shellcheck plugins-scripts/check_oracle.sh' results into the following:
In plugins-scripts/check_oracle.sh line 9: PATH="@TRUSTED_PATH@" ^-- SC2123: PATH is the shell search path. Use another name. In plugins-scripts/check_oracle.sh line 11: PROGNAME=`basename $0` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 12: PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 15: . $PROGPATH/utils.sh ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 32: print_revision $PROGNAME $REVISION ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 50: echo " ---> Requires select on v_$sysstat and v_$librarycache" ^-- SC2154: sysstat is referenced but not assigned. ^-- SC2154: librarycache is referenced but not assigned. In plugins-scripts/check_oracle.sh line 90: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 94: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 97: print_revision $PROGNAME $REVISION ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 98: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 101: print_revision $PROGNAME $REVISION ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 102: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 112: ORACLE_HOME=`IFS=: ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 113: while read SID ORACLE_HOME junk; ^-- SC2034: junk appears unused. Verify it or export it. In plugins-scripts/check_oracle.sh line 116: echo $ORACLE_HOME; ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 124: [ -z "$ORACLE_HOME" -a -d $PROGPATH/oracle ] && ORACLE_HOME=$PROGPATH/oracle ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 129: exit $STATE_UNKNOWN ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 138: tnschk=` tnsping $2` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 139: tnschk2=` echo $tnschk | grep -c OK` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 140: if [ ${tnschk2} -eq 1 ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 143: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 146: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 150: namesctl status $2 | awk ' ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 156: status = '$STATE_OK' ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 160: status = '$STATE_CRITICAL' ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 168: pmonchk=`ps -ef | grep -v grep | grep -E -c "(asm|ora)_pmon_${2}$"` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2009: Consider using pgrep instead of grepping ps output. In plugins-scripts/check_oracle.sh line 169: if [ ${pmonchk} -ge 1 ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 171: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 180: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 184: loginchk=`sqlplus dummy/user@$2 < /dev/null` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 185: loginchk2=` echo $loginchk | grep -c ORA-01017` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 186: if [ ${loginchk2} -eq 1 ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 188: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 190: loginchk3=` echo "$loginchk" | grep "ORA-" | head -1` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 192: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 196: connectchk=`sqlplus $2 < /dev/null` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 197: connectchk2=` echo $connectchk | grep -c ORA-` ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 198: if [ ${connectchk2} -eq 0 ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 200: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 202: connectchk3=` echo "$connectchk" | grep "ORA-" | head -1` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 204: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 208: if [ ${5} -gt ${6} ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 210: exit $STATE_UNKNOWN ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 212: result=`sqlplus -s ${3}/${4}@${2} << EOF ^-- SC2006: Use $(..) instead of legacy `..`. ^-- 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_oracle.sh line 222: if [ -n "`echo $result | grep ORA-`" ] ; then ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 223: error=` echo "$result" | grep "ORA-" | head -1` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 225: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 228: buf_hr=`echo "$result" | awk '/^[0-9\. \t]+$/ {print int($1)}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 229: buf_hrx=`echo "$result" | awk '/^[0-9\. \t]+$/ {print $1}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 230: result=`sqlplus -s ${3}/${4}@${2} << EOF ^-- SC2006: Use $(..) instead of legacy `..`. ^-- 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_oracle.sh line 237: if [ -n "`echo $result | grep ORA-`" ] ; then ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 238: error=` echo "$result" | grep "ORA-" | head -1` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 240: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 243: lib_hr=`echo "$result" | awk '/^[0-9\. \t]+$/ {print int($1)}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 244: lib_hrx=`echo "$result" | awk '/^[0-9\. \t]+$/ {print $1}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 246: if [ $buf_hr -le ${5} -o $lib_hr -le ${5} ] ; then ^-- 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. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 248: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 250: if [ $buf_hr -le ${6} -o $lib_hr -le ${6} ] ; then ^-- 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. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 252: exit $STATE_WARNING ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 256: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 259: if [ ${6} -lt ${7} ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 261: exit $STATE_UNKNOWN ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 263: result=`sqlplus -s ${3}/${4}@${2} << EOF ^-- SC2006: Use $(..) instead of legacy `..`. ^-- 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_oracle.sh line 276: if [ -n "`echo $result | grep ORA-`" ] ; then ^-- SC2006: Use $(..) instead of legacy `..`. ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 277: error=` echo "$result" | grep "ORA-" | head -1` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 279: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 282: ts_free=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($1)}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 283: ts_total=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($2)}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 284: ts_pct=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print int($3)}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 285: ts_pctx=`echo "$result" | awk '/^[ 0-9\.\t ]+$/ {print $3}'` ^-- SC2006: Use $(..) instead of legacy `..`. In plugins-scripts/check_oracle.sh line 288: exit $STATE_UNKNOWN ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 290: if [ "$ts_pct" -ge ${6} ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 292: exit $STATE_CRITICAL ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 294: if [ "$ts_pct" -ge ${7} ] ; then ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 296: exit $STATE_WARNING ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 299: exit $STATE_OK ^-- SC2086: Double quote to prevent globbing and word splitting. In plugins-scripts/check_oracle.sh line 303: exit $STATE_UNKNOWN ^-- SC2086: Double quote to prevent globbing and word splitting. -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/issues/1367