title: How can I loop through a directory and get wc of every txt file?
body: <p>The shell is sh.</p>
  
  <p>I have been using a for loop:</p>
  
  <pre><code>for F in *.txt
  do
  echo `wc -w $F`
  done
  </code></pre>
  
  <p>This has been returning the number of words and the name of the file. I don't understand why it keeps returning the name of the file; it looks like it should only return the number of words in the file. </p>