In /usr/bin/pnmindex line 104:
    pbmtext "$title" > $rowfile
                       ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    pbmtext "$title" > "$rowfile"


In /usr/bin/pnmindex line 105:
    rowfiles=(${rowfiles[*]} $rowfile )
              ^------------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
                             ^------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In /usr/bin/pnmindex line 106:
    row=$(($row + 1))
           ^--^ SC2004: $/${} is unnecessary on arithmetic variables.


In /usr/bin/pnmindex line 111:
    cp "$i" $tmpfile
            ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    cp "$i" "$tmpfile"


In /usr/bin/pnmindex line 112:
    description=(`pnmfile $tmpfile`)
                 ^----------------^ SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
                 ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                          ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    description=($(pnmfile "$tmpfile"))


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


In /usr/bin/pnmindex line 123:
    if [ $width -gt $size ] || \
         ^----^ SC2086: Double quote to prevent globbing and word splitting.
                    ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    if [ "$width" -gt "$size" ] || \


In /usr/bin/pnmindex line 124:
       [ $height -gt $size ]; then
         ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                     ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
       [ "$height" -gt "$size" ]; then


In /usr/bin/pnmindex line 128:
            pnmscale -quiet -xysize $size $size $i | pgmtopbm > $tmpfile
                                    ^---^ 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: 
            pnmscale -quiet -xysize "$size" "$size" "$i" | pgmtopbm > "$tmpfile"


In /usr/bin/pnmindex line 132:
            pnmscale -quiet -xysize $size $size $i > $tmpfile
                                    ^---^ 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: 
            pnmscale -quiet -xysize "$size" "$size" "$i" > "$tmpfile"


In /usr/bin/pnmindex line 140:
                pnmscale -quiet -xysize $size $size $i | \
                                        ^---^ 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: 
                pnmscale -quiet -xysize "$size" "$size" "$i" | \


In /usr/bin/pnmindex line 141:
                ppmquant -quiet $colors > $tmpfile
                                ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
                ppmquant -quiet "$colors" > "$tmpfile"


In /usr/bin/pnmindex line 143:
                pnmscale -quiet -xysize $size $size $i > $tmpfile
                                        ^---^ 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: 
                pnmscale -quiet -xysize "$size" "$size" "$i" > "$tmpfile"


In /usr/bin/pnmindex line 151:
    rm -f $imagefile
          ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    rm -f "$imagefile"


In /usr/bin/pnmindex line 153:
        pbmtext "$i" | pnmcat $back -tb $tmpfile - > $imagefile
                                        ^------^ SC2086: Double quote to prevent globbing and word splitting.
                                                     ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        pbmtext "$i" | pnmcat $back -tb "$tmpfile" - > "$imagefile"


In /usr/bin/pnmindex line 155:
        pbmtext "$i" | pnminvert | pnmcat $back -tb $tmpfile - > $imagefile
                                                    ^------^ SC2086: Double quote to prevent globbing and word splitting.
                                                                 ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        pbmtext "$i" | pnminvert | pnmcat $back -tb "$tmpfile" - > "$imagefile"


In /usr/bin/pnmindex line 157:
    rm -f $tmpfile
          ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    rm -f "$tmpfile"


In /usr/bin/pnmindex line 158:
    imagefiles=( ${imagefiles[*]} $imagefile )
                 ^--------------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
                                  ^--------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In /usr/bin/pnmindex line 160:
    if [ $col -ge $across ]; then
                  ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    if [ $col -ge "$across" ]; then


In /usr/bin/pnmindex line 162:
        rm -f $rowfile
              ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        rm -f "$rowfile"


In /usr/bin/pnmindex line 164:
        if [ $maxformat != PPM -o "$doquant" = "false" ]; then
                               ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.


In /usr/bin/pnmindex line 165:
            pnmcat $back -lr -jbottom ${imagefiles[*]} > $rowfile
                                      ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                         ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            pnmcat $back -lr -jbottom "${imagefiles[*]}" > "$rowfile"


In /usr/bin/pnmindex line 167:
            pnmcat $back -lr -jbottom ${imagefiles[*]} | \
                                      ^--------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            pnmcat $back -lr -jbottom "${imagefiles[*]}" | \


In /usr/bin/pnmindex line 168:
            ppmquant -quiet $colors > $rowfile
                            ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                      ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            ppmquant -quiet "$colors" > "$rowfile"


In /usr/bin/pnmindex line 171:
        rm -f ${imagefiles[*]}
              ^--------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        rm -f "${imagefiles[*]}"


In /usr/bin/pnmindex line 174:
        rowfiles=( ${rowfiles[*]} $rowfile )
                   ^------------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
                                  ^------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In /usr/bin/pnmindex line 176:
        row=$(($row + 1))
               ^--^ SC2004: $/${} is unnecessary on arithmetic variables.


In /usr/bin/pnmindex line 178:
        col=$(($col + 1))
               ^--^ SC2004: $/${} is unnecessary on arithmetic variables.


In /usr/bin/pnmindex line 187:
    rm -f $rowfile
          ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    rm -f "$rowfile"


In /usr/bin/pnmindex line 188:
    if [ $maxformat != PPM -o "$doquant" = "false" ]; then
                           ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.


In /usr/bin/pnmindex line 189:
        pnmcat $back -lr -jbottom ${imagefiles[*]} > $rowfile
                                  ^--------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                     ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        pnmcat $back -lr -jbottom "${imagefiles[*]}" > "$rowfile"


In /usr/bin/pnmindex line 191:
        pnmcat $back -lr -jbottom ${imagefiles[*]} | \
                                  ^--------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        pnmcat $back -lr -jbottom "${imagefiles[*]}" | \


In /usr/bin/pnmindex line 192:
        ppmquant -quiet $colors > $rowfile
                        ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                  ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        ppmquant -quiet "$colors" > "$rowfile"


In /usr/bin/pnmindex line 194:
    rm -f ${imagefiles[*]}
          ^--------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    rm -f "${imagefiles[*]}"


In /usr/bin/pnmindex line 195:
    rowfiles=( ${rowfiles[*]} $rowfile )
               ^------------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
                              ^------^ SC2206: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.


In /usr/bin/pnmindex line 199:
    cat $rowfiles
        ^-------^ SC2128: Expanding an array without an index only gives the first element.
        ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    cat "$rowfiles"


In /usr/bin/pnmindex line 201:
    if [ $maxformat != PPM -o "$doquant" = "false" ]; then
                           ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.


In /usr/bin/pnmindex line 202:
        pnmcat $back -tb ${rowfiles[*]}
                         ^------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        pnmcat $back -tb "${rowfiles[*]}"


In /usr/bin/pnmindex line 204:
        pnmcat $back -tb ${rowfiles[*]} | ppmquant -quiet $colors
                         ^------------^ SC2086: Double quote to prevent globbing and word splitting.
                                                          ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        pnmcat $back -tb "${rowfiles[*]}" | ppmquant -quiet "$colors"


In /usr/bin/pnmindex line 207:
rm -f ${rowfiles[*]}
      ^------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
rm -f "${rowfiles[*]}"

For more information:
  https://www.shellcheck.net/wiki/SC2128 -- Expanding an array without an ind...
  https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] || [ q ] as [ p -o q...
  https://www.shellcheck.net/wiki/SC2206 -- Quote to prevent word splitting/g...