[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed : * final newline
From: |
Bonzini |
Subject: |
Re: sed : * final newline |
Date: |
Tue, 8 Jul 2003 09:05:16 +0200 |
Yes, I know this. The problem is that this does not affect only `sed :' but
also `sed
10,$!d' and the like.
> This behaviour also violates POSIX, as it clearly states that:
> "Whenever the pattern space is written to standard output or a named
> file, sed shall immediately follow it with a <newline>."
No, POSIX expects that each line of pattern space is ended by a newline.
Otherwise
behavior is undefined: HP/UX ignores the line, Solaris appends a new-line etc.
The best would be to turn the flag into a three-state: put new-line after
(standard),
no new-line, put new-line before (after a line without a new-line has been
printed).
Might attempt it for 4.1
Paolo