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