In /usr/bin/mib2c-update line 35: if [ $UPDATE_DEBUG -ge 1 ]; then ^-----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$UPDATE_DEBUG" -ge 1 ]; then In /usr/bin/mib2c-update line 36: echo $1 ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: echo "$1" In /usr/bin/mib2c-update line 42: echo "ERROR: $@" >&2 ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/mib2c-update line 53: cd $1 ^---^ SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: cd "$1" || exit In /usr/bin/mib2c-update line 54: if [ $? -ne 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 61: cp $@ ^-- SC2068: Double quote array expansions to avoid re-splitting elements. In /usr/bin/mib2c-update line 62: if [ $? -ne 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 63: die "'cp $@' failed!" ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/mib2c-update line 74: if [ ! -d $d ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ ! -d "$d" ]; then In /usr/bin/mib2c-update line 76: mkdir -p $d ^-- SC2086: Double quote to prevent globbing and word splitting. Did you mean: mkdir -p "$d" In /usr/bin/mib2c-update line 77: if [ $? -ne 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 84: if [ -z "$UPDATE_OID" ]; then ^---------^ SC2153: Possible misspelling: UPDATE_OID may not be assigned, but UPDATE_ORIG is. In /usr/bin/mib2c-update line 99: if [ $rc -eq 0 ] && [ $UPDATE_NOPROBE -ne 1 ]; then ^-------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ $rc -eq 0 ] && [ "$UPDATE_NOPROBE" -ne 1 ]; then In /usr/bin/mib2c-update line 101: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 124: local rc=0 ^------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/mib2c-update line 125: local rcs=0 ^-------^ SC2039: In POSIX sh, 'local' is undefined. In /usr/bin/mib2c-update line 126: safecd $DD_ORIG ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: safecd "$DD_ORIG" In /usr/bin/mib2c-update line 128: files=`ls *$UPDATE_OID* 2>/dev/null` ^----------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options. ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: files=$(ls *"$UPDATE_OID"* 2>/dev/null) In /usr/bin/mib2c-update line 129: if [ ! -z "$files" ]; then ^-- SC2236: Use -n instead of ! -z. In /usr/bin/mib2c-update line 132: -I "$""Id:" $f $DD_CURR/$f >> $DD_OUTPUT ^-- SC1135: Prefer escape over ending quote to make $ literal. Instead of "It costs $"5, use "It costs \$5". ^-- 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. Did you mean: -I "$""Id:" "$f" "$DD_CURR"/"$f" >> "$DD_OUTPUT" In /usr/bin/mib2c-update line 134: rcs=`expr $rcs + $rc` ^---------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. ^--^ SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. Did you mean: rcs=$(expr $rcs + $rc) In /usr/bin/mib2c-update line 140: if [ $rcs -eq 0 ]; then ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$rcs" -eq 0 ]; then In /usr/bin/mib2c-update line 141: rm -f $DD_OUTPUT ^--------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: rm -f "$DD_OUTPUT" In /usr/bin/mib2c-update line 144: return $rcs ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: return "$rcs" In /usr/bin/mib2c-update line 153: if [ ! -d $dest ]; then ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ ! -d "$dest" ]; then In /usr/bin/mib2c-update line 156: if [ ! -d $src ]; then ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ ! -d "$src" ]; then In /usr/bin/mib2c-update line 159: safecd $src ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: safecd "$src" In /usr/bin/mib2c-update line 160: files=`ls *$UPDATE_OID* 2>/dev/null| egrep "(file|onf|m2d|txt|\.c|\.h)$"` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^--------------------------^ SC2012: Use find instead of ls to better handle non-alphanumeric filenames. ^-- SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options. ^---------^ SC2086: Double quote to prevent globbing and word splitting. ^---^ SC2196: egrep is non-standard and deprecated. Use grep -E instead. Did you mean: files=$(ls *"$UPDATE_OID"* 2>/dev/null| egrep "(file|onf|m2d|txt|\.c|\.h)$") In /usr/bin/mib2c-update line 164: safecp $files $dest ^----^ SC2086: Double quote to prevent globbing and word splitting. ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: safecp "$files" "$dest" In /usr/bin/mib2c-update line 165: if [ $? -ne 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 177: cnt=`ls $UPDATE_CURR/*$UPDATE_OID* 2>/dev/null | egrep "(file|onf|m2d|txt|\.c|\.h)$" | wc -l` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames. ^----------^ SC2086: Double quote to prevent globbing and word splitting. ^---------^ SC2086: Double quote to prevent globbing and word splitting. ^---^ SC2196: egrep is non-standard and deprecated. Use grep -E instead. Did you mean: cnt=$(ls "$UPDATE_CURR"/*"$UPDATE_OID"* 2>/dev/null | egrep "(file|onf|m2d|txt|\.c|\.h)$" | wc -l) In /usr/bin/mib2c-update line 178: if [ $cnt -eq 0 ]; then ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ "$cnt" -eq 0 ]; then In /usr/bin/mib2c-update line 184: do_diff $UPDATE_ORIG/ $UPDATE_CURR/ $UPDATE_PATCH/custom.$UPDATE_DATE ^----------^ 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. Did you mean: do_diff "$UPDATE_ORIG"/ "$UPDATE_CURR"/ "$UPDATE_PATCH"/custom."$UPDATE_DATE" In /usr/bin/mib2c-update line 185: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 194: copy_defaults . $UPDATE_NEW ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: copy_defaults . "$UPDATE_NEW" In /usr/bin/mib2c-update line 196: safecd $UPDATE_NEW ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: safecd "$UPDATE_NEW" In /usr/bin/mib2c-update line 197: files=`ls *$UPDATE_OID* 2>/dev/null | grep -v "^default"` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2010: Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames. ^-- SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options. ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: files=$(ls *"$UPDATE_OID"* 2>/dev/null | grep -v "^default") In /usr/bin/mib2c-update line 198: if [ ! -z "$files" ]; then ^-- SC2236: Use -n instead of ! -z. In /usr/bin/mib2c-update line 199: rm -f $files > /dev/null 2>&1 ^----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: rm -f "$files" > /dev/null 2>&1 In /usr/bin/mib2c-update line 201: echo "mib2c $@ -c $UPDATE_CONF $UPDATE_MIB2C_OPTS $UPDATE_OID" ^-- SC2145: Argument mixes string and array. Use * or separate argument. In /usr/bin/mib2c-update line 202: mib2c $@ -c $UPDATE_CONF $UPDATE_MIB2C_OPTS $UPDATE_OID ^-- SC2068: Double quote array expansions to avoid re-splitting elements. ^----------^ 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. Did you mean: mib2c $@ -c "$UPDATE_CONF" "$UPDATE_MIB2C_OPTS" "$UPDATE_OID" In /usr/bin/mib2c-update line 203: if [ $? -ne 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 214: do_diff $UPDATE_ORIG/ $UPDATE_NEW/ $UPDATE_PATCH/generated.$UPDATE_DATE ^----------^ 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. Did you mean: do_diff "$UPDATE_ORIG"/ "$UPDATE_NEW"/ "$UPDATE_PATCH"/generated."$UPDATE_DATE" In /usr/bin/mib2c-update line 215: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 217: safecd $UPDATE_PATCH ^-----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: safecd "$UPDATE_PATCH" In /usr/bin/mib2c-update line 218: files=`ls *.$UPDATE_DATE 2>/dev/null ` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^-- SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: files=$(ls *."$UPDATE_DATE" 2>/dev/null ) In /usr/bin/mib2c-update line 219: if [ ! -z "$files" ]; then ^-- SC2236: Use -n instead of ! -z. In /usr/bin/mib2c-update line 220: rm $files ^----^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: rm "$files" In /usr/bin/mib2c-update line 230: files=`ls $UPDATE_MERGED/* 2>/dev/null ` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: files=$(ls "$UPDATE_MERGED"/* 2>/dev/null ) In /usr/bin/mib2c-update line 231: if [ ! -z "$files" ]; then ^-- SC2236: Use -n instead of ! -z. In /usr/bin/mib2c-update line 232: rm $UPDATE_MERGED/* ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: rm "$UPDATE_MERGED"/* In /usr/bin/mib2c-update line 234: do_cp $UPDATE_NEW $UPDATE_MERGED ^---------^ SC2086: Double quote to prevent globbing and word splitting. ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: do_cp "$UPDATE_NEW" "$UPDATE_MERGED" In /usr/bin/mib2c-update line 236: if [ -f $UPDATE_PATCH/custom.$UPDATE_DATE ]; then ^-----------^ SC2086: Double quote to prevent globbing and word splitting. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -f "$UPDATE_PATCH"/custom."$UPDATE_DATE" ]; then In /usr/bin/mib2c-update line 240: patch --forward -F $FUZZ -N -d $UPDATE_MERGED -i $UPDATE_PATCH/custom.$UPDATE_DATE ^------------^ 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. Did you mean: patch --forward -F $FUZZ -N -d "$UPDATE_MERGED" -i "$UPDATE_PATCH"/custom."$UPDATE_DATE" In /usr/bin/mib2c-update line 241: if [ $? -ne 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In /usr/bin/mib2c-update line 253: if [ -d $SRC/defaults ]; then ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -d "$SRC"/defaults ]; then In /usr/bin/mib2c-update line 254: safecp -a $SRC/defaults $DST ^--^ SC2086: Double quote to prevent globbing and word splitting. ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: safecp -a "$SRC"/defaults "$DST" In /usr/bin/mib2c-update line 256: files=`ls $SRC/default-*.m2d 2>/dev/null ` ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: files=$(ls "$SRC"/default-*.m2d 2>/dev/null ) In /usr/bin/mib2c-update line 257: if [ ! -z "$files" ]; then ^-- SC2236: Use -n instead of ! -z. In /usr/bin/mib2c-update line 258: safecp $files $DST ^----^ SC2086: Double quote to prevent globbing and word splitting. ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: safecp "$files" "$DST" In /usr/bin/mib2c-update line 267: do_cp $UPDATE_CURR $UPDATE_BACKUP/curr/ ^----------^ SC2086: Double quote to prevent globbing and word splitting. ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: do_cp "$UPDATE_CURR" "$UPDATE_BACKUP"/curr/ In /usr/bin/mib2c-update line 268: copy_defaults . $UPDATE_BACKUP/curr/ ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: copy_defaults . "$UPDATE_BACKUP"/curr/ In /usr/bin/mib2c-update line 271: do_cp $UPDATE_MERGED $UPDATE_CURR/ ^------------^ SC2086: Double quote to prevent globbing and word splitting. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: do_cp "$UPDATE_MERGED" "$UPDATE_CURR"/ In /usr/bin/mib2c-update line 275: do_cp $UPDATE_ORIG $UPDATE_BACKUP/orig/ ^----------^ SC2086: Double quote to prevent globbing and word splitting. ^------------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: do_cp "$UPDATE_ORIG" "$UPDATE_BACKUP"/orig/ In /usr/bin/mib2c-update line 277: do_cp $UPDATE_NEW $UPDATE_ORIG/ ^---------^ SC2086: Double quote to prevent globbing and word splitting. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: do_cp "$UPDATE_NEW" "$UPDATE_ORIG"/ In /usr/bin/mib2c-update line 283: do_cp $UPDATE_NEW $UPDATE_CURR/ ^---------^ SC2086: Double quote to prevent globbing and word splitting. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: do_cp "$UPDATE_NEW" "$UPDATE_CURR"/ In /usr/bin/mib2c-update line 285: copy_defaults $UPDATE_NEW . ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: copy_defaults "$UPDATE_NEW" . In /usr/bin/mib2c-update line 288: do_cp $UPDATE_NEW $UPDATE_ORIG/ ^---------^ SC2086: Double quote to prevent globbing and word splitting. ^----------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: do_cp "$UPDATE_NEW" "$UPDATE_ORIG"/ In /usr/bin/mib2c-update line 300: copy_defaults $UPDATE_NEW . ^---------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: copy_defaults "$UPDATE_NEW" . In /usr/bin/mib2c-update line 307: if [ -f $HOME/.mib2c-updaterc ]; then ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -f "$HOME"/.mib2c-updaterc ]; then In /usr/bin/mib2c-update line 308: . $HOME/.mib2c-updaterc ^-------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location. ^---^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: . "$HOME"/.mib2c-updaterc In /usr/bin/mib2c-update line 311: if [ -f $PWD/.mib2c-updaterc ]; then ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if [ -f "$PWD"/.mib2c-updaterc ]; then In /usr/bin/mib2c-update line 312: . $PWD/.mib2c-updaterc ^------------------^ SC1090: Can't follow non-constant source. Use a directive to specify location. ^--^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: . "$PWD"/.mib2c-updaterc In /usr/bin/mib2c-update line 317: echo "UPDATE_OID=ipAddressTable" >> .mib2c-updaterc ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects. In /usr/bin/mib2c-update line 328: UPDATE_DATE=`date "+%F_%I.%M"` ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: UPDATE_DATE=$(date "+%F_%I.%M") In /usr/bin/mib2c-update line 340: read ans ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/mib2c-update line 348: read ans ^--^ SC2162: read without -r will mangle backslashes. In /usr/bin/mib2c-update line 361: gen_code $@ ^-- SC2068: Double quote array expansions to avoid re-splitting elements. For more information: https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ... https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source....