[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Branch on sed
From: |
Paolo Bonzini |
Subject: |
Re: Branch on sed |
Date: |
Sat, 03 Oct 2009 17:53:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 |
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:
seq 1 10 | sed -e '1,4d;3,6d'
Paolo
- Branch on sed, Norihiro Tanaka, 2009/10/03
- Re: Branch on sed,
Paolo Bonzini <=