I searched here and found I could use sed to edit some text files. These are emlx files from Apple's Mail.app which has added some plist date. I want to remove the line
<?xml version="1.0" encoding="UTF-8"?>
and all following from the files and save the file.
This (almost) does what I want
sed -n '/<?xml version="1.0" encoding="UTF-8"?>/q;p myfile.emlx
Using a Mac, in Terminal I see the file written out having the lines edited out. Good. But I'm soft and don't know how to get sed to save the file. I'm happy to save to the original (I'm working from copies).
Apparently
-i
should do what I need. But it isn't. Please give me a clue! Then later I'll ask how to deal with a batch of 1500 files.