In /usr/bin/ppmquantall line 50:
files=($@)
       ^-- SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In /usr/bin/ppmquantall line 61:
for i in ${files[@]}; do
         ^---------^ SC2068: Double quote array expansions to avoid re-splitting elements.


In /usr/bin/ppmquantall line 62:
    widths=(${widths[*]} `egrep -v '^#' $i | sed '1d; s/ .*//; 2q'`) # #204890
            ^----------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
                         ^-- SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                          ^---^ SC2196: egrep is non-standard and deprecated. Use grep -E instead.
                                        ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    widths=(${widths[*]} $(egrep -v '^#' "$i" | sed '1d; s/ .*//; 2q')) # #204890


In /usr/bin/ppmquantall line 63:
    heights=(${heights[*]} `egrep -v '^#' $i | sed '1d; s/ .*//; 2q'`) # #204890
             ^-----------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
                           ^-- SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                           ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                            ^---^ SC2196: egrep is non-standard and deprecated. Use grep -E instead.
                                          ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    heights=(${heights[*]} $(egrep -v '^#' "$i" | sed '1d; s/ .*//; 2q')) # #204890


In /usr/bin/ppmquantall line 71:
pnmcat -topbottom -jleft -white ${files[@]} | ppmquant $newcolors > $all
                                ^---------^ 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.

Did you mean: 
pnmcat -topbottom -jleft -white ${files[@]} | ppmquant "$newcolors" > "$all"


In /usr/bin/ppmquantall line 72:
if [ $? != 0 ]; then
     ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/ppmquantall line 80:
    pnmcut -left 0 -top $y -width ${widths[$i]} -height ${heights[$i]} $all \
                                  ^-----------^ 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: 
    pnmcut -left 0 -top $y -width "${widths[$i]}" -height "${heights[$i]}" "$all" \


In /usr/bin/ppmquantall line 81:
        > ${files[$i]}$ext
          ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                      ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        > "${files[$i]}""$ext"


In /usr/bin/ppmquantall line 82:
    if [ $? != 0 ]; then
         ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.


In /usr/bin/ppmquantall line 85:
    y=$(($y + ${heights[$i]}))
         ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /usr/bin/ppmquantall line 86:
    i=$(($i + 1))
         ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /usr/bin/ppmquantall line 89:
rm -f $all
      ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
rm -f "$all"

For more information:
  https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
  https://www.shellcheck.net/wiki/SC2206 -- Quote to prevent word splitting/g...
  https://www.shellcheck.net/wiki/SC2207 -- Prefer mapfile or read -a to spli...