diff options
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/process.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 6c14631..17f543d 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -491,7 +491,11 @@ lputs(s) if (isprint((unsigned char)*s) && *s != '\\') { (void)putchar(*s); count++; - } else if (*s != '\n') { + } else if (*s == '\n') { + (void)putchar('$'); + (void)putchar('\n'); + count = 0; + } else { escapes = "\\\a\b\f\r\t\v"; (void)putchar('\\'); if ((p = strchr(escapes, *s))) { |