title: Bash oneliner with AWK runs in terminal but not in script
body: <p>I have a file with the following type of data:</p>
  
  <pre><code>4-11-11 12:59:01,C,26,668
  4-11-11 12:59:31,C,26,668
  4-11-11 13:00:01,C,26,668
  4-11-11 13:00:31,C,26,668
  4-11-11 13:01:01,C,26,668
  4-11-11 13:01:31,C,26,668
  </code></pre>
  
  <p>and I want the following output:</p>
  
  <pre><code>12:59:01 26.668
  12:59:31 26.668
  13:00:01 26.668
  13:00:31 26.668
  13:01:01 26.668
  13:01:31 26.668
  </code></pre>
  
  <p>This works just fine in the termal with the following line, but not in a bash script, it just gives me an empty file. The problem started after I added the awk part. </p>
  
  <pre><code>cut -d ' ' -f2 $file | cut -d ',' -f-1,3- | awk -f tmp.csv -F"," '{print $1 " " $2 "." $3}' | sed 's/"//'  &gt; tmp.csv
  cp tmp.csv &gt; $file
  </code></pre>
  
  <p>Could anyone explain why this won't work in a script?</p>
  
  <p>Thanks!</p>