https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241206

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from [email protected] ---
I'm not sure this is a bug, just a difference in behavior between GNU sed and
BSD sed (of which there are many).

The docs for 'a' in "man 1 sed" say: "Write text to standard output immediately
before each attempt to read a line of input". In my reading of that, since
"text" does not contain a newline, neither does the output.

You probably already know this, but this works in both cases:

    $ jot 2 | sed '/1/a\
    > one point five
    > '

(That is, type the extra newline in your shell, before adding the terminating
single-quote. This is the same as in your script example.)

Though that might technically run afoul of GNU sed's documentation, which says
"Append text, which has each embedded newline preceded by a backslash."
I just put a raw newline there, not preceded by backslash.

It does work though, regardless.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to