On 10/03/2009 04:22 PM, Norihiro Tanaka wrote:
> Hi,
>
> Which is correct result for the following commands, in which branch
> command is included, in POSIX ?
Indeed GNU sed 4.1.0 made line number addresses are "absolute": you do
not need to match the address on the exact line corresponding to the
first address in order to activate it.
I don't remember exactly but POSIX either does not specify it or
specifies it like GNU sed 4.1.0 and newer do. I also think that BSD sed
implements it too (because I learnt about this behavior when I
incorporated the BSD sed testsuite into GNU sed).
Here is another example that shows why GNU sed's behavior is preferrable: