title: KSH for loop works on Solaris/Mac but not on Red Hat Linux
body: <p>The following Ksh script gives me "No such file or directory" error message on Red Hat Linux system.  Does anyone has a solution?</p>
  
  <pre><code>#!/usr/bin/ksh
  for f in `cat files.dat`
  do
    wc $f
  done
  </code></pre>
  
  <p>For example, <code>files.dat</code> has 3 lines of data and each line is a file in the current directory where the script is running from.</p>
  
  <pre><code>a.c
  a.h
  b.c
  </code></pre>
  
  <p>Note, the same for loop generated the same error message if running from command line too.</p>
  
  <p>It works on Solaris/Mac box but not on Red Hat system.</p>
  
  <p>Thanks.</p>