NetBSD-Bugs archive

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

Re: bin/45955: sed(1) fails to append newline after 'c' command



The following reply was made to PR bin/45955; it has been noted by GNATS.

From: "Valeriy E. Ushakov" <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/45955: sed(1) fails to append newline after 'c' command
Date: Fri, 10 Feb 2012 07:34:51 +0400

 On Thu, Feb 09, 2012 at 16:08:56 +0400, Valeriy E. Ushakov wrote:
 
 > So the observed effect is here because when a command line (-e) or the
 > last line of a script (-f) are processed and there's no final newline
 > and the line contains "text" for "a", "c" or "i" command, the newline
 > is not added to the "text".
 
 Forgot to mention, correct workaround is
 
 echo foo | sed 'c\
 bar
 '
 
 without the backslash (that just triggers the same bug).
 
 -uwe
 


Home | Main Index | Thread Index | Old Index