https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66136
--- Comment #2 from Szabolcs Nagy <nszabolcs at gmail dot com> --- the posix standard does not seem to disallow \n in the replacement string so i think freebsd sed should be fixed (or report the bug to the austingroup). meanwhile i will prepare a fix for this in gcc.