'if EOF || Error' or 'if ! read-is-OK'
Latter applies for ordinary files also, no? No need of look ahead.
This is the next-to-last line, not the last line. sed does test for it,
but because the result would be off-by-one, it has to look ahead one line.
in interactive or line-by-line example shown, it's buggy.
No. sed is not meant for "interactive or line-by-line" usage. What
matters is only the output.
Paolo
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]