title: Bash Shell Script Inner loop of Nested Loops not working
body: <p>In attempting to rename a set of files with variations of (1-26), Left/Right and png/bmp I have the following script</p>
  
  <pre><code>#!/bin/bash
  
  NUMBER_LIST=$(seq -f "%03g" 1 26)
  EXT_LIST=("png" "bmp")
  SIDE_LIST=("right" "left")
  for NUMBER in $NUMBER_LIST
  do
      for SIDE in $SIDE_LIST
      do
          for EXT in $EXT_LIST
          do  
              OLD="${SIDE}_${NUMBER}.${EXT}"
              NEW="${NUMBER}_${SIDE}.${EXT}"
              mv $OLD $NEW
  
          done
      done
  done
  </code></pre>
  
  <p>Only files that are designated <strong>right</strong> and <strong>bmp</strong> get renamed. So
  it looks like it is only iterating through the outermost loop, and not iterating through the inner loops (just uses first element).</p>
  
  <p>I've looked elsewhere on the net but am having trouble finding anything relevant.</p>
  
  <p>Any guesses as to what might be wrong?</p>
  
  <p>Thanks,
  Jeff</p>