title: Linux shell: unexpected EOF while looking for matching `"'
body: <p>It is a for loop with three levels, for three arrays:</p>
  
  <pre><code>u in userdim=(67 133 200)
  
  i in itemdim=(78 156 234)
  
  t in tagdim=(50 100 150).
  
  
  matlab -nodesktop -nosplash -r "matlab_function('folderA/txtFile1.txt','folderB/txtFile[${userdim[${u}]} ${itemdim[${i}]} ${tagdim[${t}]}].txt',[${userdim[${u]} ${itemdim[${i}]} ${tagdim[${t}]}],2)"
  # echo "u=$[${u}+1]; i=${i}; t=${t}"
  </code></pre>
  
  <p>Its result is </p>
  
  <pre><code>line 24: unexpected EOF while looking for matching `"'
  
  line 30: syntax error: unexpected end of file
  </code></pre>
  
  <p>Is there something wrong with the "matlab..." line? Especially with the single quotation marks?</p>