title: bash echo number of lines of file given in a bash variable without the file name
body: <p>I have the following three constructs in a bash script:</p>
  
  <pre><code>NUMOFLINES=$(wc -l $JAVA_TAGS_FILE)
  echo $NUMOFLINES" lines"
  
  echo $(wc -l $JAVA_TAGS_FILE)" lines"
  
  echo "$(wc -l $JAVA_TAGS_FILE) lines"
  </code></pre>
  
  <p>And they both produce identical output when the script is run:</p>
  
  <pre><code>121711 /home/slash/.java_base.tag lines
  121711 /home/slash/.java_base.tag lines
  121711 /home/slash/.java_base.tag lines
  </code></pre>
  
  <p>I.e. the name of the file is also echoed (which I don't want to). Why do these scriplets fail and how should I output a clean:</p>
  
  <pre><code>121711 lines
  </code></pre>
  
  <p>?</p>