title: substitute a text pattern in a bunch of files?
body: <p>File list contains a few thousands filenames like:</p>
  
  <pre><code>./folder/folder/file.ext
  </code></pre>
  
  <p>For each item of the list I should edit a file: substitute text pattern "old_text_pattern" by "new_text_pattern".
  This command:</p>
  
  <pre><code>cat filelist | while read line; do sed -i 's/END_CREDIT_END/END_CREDIT/g' "$line"; done
  </code></pre>
  
  <p>gives an error:</p>
  
  <pre><code>sed: 1: "./folder ...": invalid command code . 
  </code></pre>
  
  <p>How to perform the substitution properly? Thanks.</p>