diff options
author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-06-22 03:00:52 +0000 |
---|---|---|
committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-06-22 03:00:52 +0000 |
commit | 5953156dca4ca279469d80edeccfdd34e918cf80 (patch) | |
tree | 7174e3cc93b752e21ad3b1f6e138b3c60b9c9361 /usr.bin/sed | |
parent | 6afa7793080e6f101c3f2e10c253e3de40fde244 (diff) | |
download | src-5953156dca4ca279469d80edeccfdd34e918cf80.tar.gz src-5953156dca4ca279469d80edeccfdd34e918cf80.zip |
Now that the pattern space contains no trailing newline, modify the `l'
command's output so it's the same as what SUSv3 specifies.
Notes
Notes:
svn path=/head/; revision=98603
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 6c1463171cc8..17f543d39ee5 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))) { |