What does Linux diff -e or -ed option do?

You can use diff -e or -ed option to output the difference to an ed script and then use the ed script the make the source file the same as the target file.