title: Reading line by line from a file in unix
body: <p>I am a newbie in Unix I have a file which contains a list of file names. I am trying to copy every file in the same directory but with a different extension. Its not working. Can anyone tell me why my code is bellow csl_nl.sts is the file with name of other files?</p>
  
  <pre><code>#!/bin/csh
  set files = ("csl_nl.sts")
  foreach file ('cat files')
  
    echo "Copying" $file "to" $file.cdc
    cp $file $file.cdc
  
  end
  exit 0
  </code></pre>