title: why it is wrong to nested loop of while and while or for?
body: <p>In my project, i use linux shell to fetch some data.</p>
  <p>I found a error when i ran the script.</p>
  <p>I write a test.sh to test my code:</p>
  <pre><code>[john@node04 findApp]$ cat test.sh 
   while read line
   do
     echo $line
     while read Row
     do
     done &lt; daysnameFiles
   done &lt; allUserAppIn
  </code></pre>
  <p>when i ran the test code, i got syntax error</p>
  <pre><code>[john@node04 findApp]$ sh test.sh 
   test.sh: line 6: syntax error near unexpected token `done'
   test.sh: line 6: `   done &lt; daysnameFiles'
  </code></pre>
  <p>I have tried another way to use for:</p>
  <pre><code>while read line 
  do
    rslInfo=$line
    for j in $(cat daysnameFiles)
    do
     echo &quot;test&quot;
    done
  done &lt; allUserAppIn
  </code></pre>
  <p>I got the same error.</p>