diff options
author | Jean-Marc Zucconi <jmz@FreeBSD.org> | 1995-02-06 00:14:50 +0000 |
---|---|---|
committer | Jean-Marc Zucconi <jmz@FreeBSD.org> | 1995-02-06 00:14:50 +0000 |
commit | 30ad8d9349289bef908ed483e81a851ecfbba908 (patch) | |
tree | c3008505807ae48a21aed8b6f8bf0d22ad7ca50f /usr.bin | |
parent | 768483b7619cd49f1b729e4a3c544d592681c434 (diff) | |
download | src-30ad8d9349289bef908ed483e81a851ecfbba908.tar.gz src-30ad8d9349289bef908ed483e81a851ecfbba908.zip |
Correct a bug in the P function: according to 7th edition UNIX (tm), the
newline must be part of the pattern space i.e. `echo a|sed -e P' must print
a
a
and not
aa
This is consistent with gnu sed, SunOS, Ultrix (and probably others!)
Notes
Notes:
svn path=/head/; revision=6209
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sed/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sed/process.c b/usr.bin/sed/process.c index 2ec8aacc5879..1bcda6df184b 100644 --- a/usr.bin/sed/process.c +++ b/usr.bin/sed/process.c @@ -180,7 +180,7 @@ redirect: if (pd) break; if ((p = memchr(ps, '\n', psl)) != NULL) { - oldc = *p; + oldc = *++p; *p = '\0'; } OUT(ps) |