I'm removing the same text from a number of files using
sed -n -i '' '/<?xml version="1.0" encoding="UTF-8"?>/q;p' myfile.emlx
which works so far.
I understand that I can run this over all the files in the current directory. I tested this using
sed -i '' 's/^/\t/' *.txt
and that worked as expected, however when I try
sed -n -i '' '/<?xml version="1.0" encoding="UTF-8"?>/q;p' *.emlx
although the first file is correctly ammended and saved, all the text from all the other files is removed. I've tried various combinations of -i and -n etc but can't work out my problem.