sed: -e expression #1, char 9: Extra characters after command
What does sed -V say?
The example works fine
GNU sed version 3.02.80
Did you copy & paste the example, or type it out?
As for the "only once" part ... I don't think that regexp
allow such a feature...
You'd have to go beyond a one-liner and feed
sed with a script that does the trick not with an
append, but rather with a substitution which (by
default, if you don't use the g-switch at the end)
will only replace the first occurence.
You'd be doing something like
s|junk|junk\nHere's more junk!|
P.S.: You should really read the tutorial I posted ;)