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