You can use \n for newline in your format argument (where you have '%s'), but not in the rest. So your answer doesn't work. And putting it in the format argument instead gives issues with %.
– derobertSep 5 '14 at 20:38

Does this approach have any added benefit than other solutions?
Yes, this approach has the added benefit of appending to any files return in a search, such as this:
find . -name "*.html" -exec sed -i '$ a </html>' {} \;

I used the above example to insert the ending html tag that was missing on every html page within a number of directories.

If you would show the syntax for appending multiple lines to a file, then this would be an answer to the question (although not a very useful one). All the other answers simply write the new text. This answer reads the entire file and rewrites it, plus the added text. Does this approach have any benefit over the others?
– G-ManMar 18 '16 at 20:09

This only works with GNU sed. BSD sed bails with the error: command a expects \ followed by text. So don't use this for a scripted solution; it's liable to break. (Or do it properly as the BSD required syntax is POSIX compatible and will work on GNU sed as well.
– WildcardMar 18 '16 at 20:28

This is a very good solution, as it does not do stream redirection (>, >>) and thus does not suffer from their problems such as running sudo echo 'something' > /file. For me it perfectly allows to append a line to a file in lxd container like that: lxc exec c sed -- '$ a newline' /myfile.
– Draco AterAug 23 '16 at 19:19

The echo "a new line" >> foo.file will not create a new line when the file is not end of new line, but sed -i '$ a a new line' foo.file will do, so sed is better especially you want always append a new line to the file.
– zhoujiSep 12 '16 at 10:27