title: I have to rename all file names with first word of their content in unix
body: <p>I used this</p>
  
  <pre><code>head -1 -q *.txt|awk '{print $1}' 
  </code></pre>
  
  <p>which prints first line of the content in a file.
  Now how to proceed with renaming the files?</p>