2010-06-18 14:52:25 +0100, Geoff Clare: > > (0000430) wpollock (reporter) - 2010-06-17 19:08 > > http://austingroupbugs.net/view.php?id=262#c430 > > ---------------------------------------------------------------------- > > The proposed change: > > -e script_frag Add the text specified by the script_frag option-argument, > > along with a newline, to the end of the script of editing commands. > > > > Doesn't really state what I think is desired, which according to the > > (proposed) rationale is that newlines are separators and not terminators. > > That is, with a single -e option no newlines are added to the script (and > > thus "sed [-n] -e script [file...]" behaves the same as "sed [-n] script > > [file...]". Also note that currently, "sed [-n] -e script script > > [file...]" is not allowed, so the phrase "add to the script" is > > misleading. > > > > Perhaps a better wording would be this: > > > > -e script The script option-argument shall have the same properties as the > > script operand, described in the OPERANDS section. If multiple instances > > of this option and argument are used, the script arguments are concatenated > > together with a newline separator between each fragment. > > I agree that the original wording has a problem with the added > newlines, but this alternative doesn't work either. It doesn't > account for a -e being followed by a -f. > > I suggest changing: > > -e script > Add the editing commands specified by the script [...]
(replying to a very old email as context for the recent discussion). Geoff, it looks like your change from the initially requested "Add the text specified by the script_frag" to "Add the editing commands specified by the script" was not intended as that was not part of the point you were making. IMO, that bug should be revisited to either - address the intent of the initial request where the script being run is the concatenation of the fragments passed to -e and -f with newlines. - or a variant thereof that covers historical implementations, that is same as above except that a fragment can't end in a backslash. Even sed -e '=;#\' -e q doesn't work (doesn't run the = command!) in traditional sed implementation. -- Stephane