bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed: delete a line and there goes the neighborhood at least for i an


From: Paul Eggert
Subject: Re: sed: delete a line and there goes the neighborhood at least for i and a
Date: Sat, 9 Mar 2002 21:01:52 -0800 (PST)

> From: Dan Jacobson <address@hidden>
> Date: 10 Mar 2002 05:58:16 +0800
> 
> Sorry.  We've been thru this before, but I still find it so illogical
> that any line barely near a line that has been deleted is then
> unusable thru the rest of the sed program.

It may be illogical to you, but it makes perfect sense to POSIX.  :-)

POSIX says that once you've deleted a line, sed skips the rest of the
script for that line, so that explains your first example.  POSIX also
seems to require the line number to be positive, so your other
examples (all involving line 0) all have undefined behavior.

UNIX sed agrees with GNU sed on all the examples you give.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]