[Bug 160745] sed(1) appends '\n' at the end of binary data (unlike gsed(1))

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 8 17:29:54 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=160745

--- Comment #1 from commit-hook at freebsd.org ---
A commit references this bug:

Author: dumbbell
Date: Fri Aug  8 17:29:02 UTC 2014
New revision: 269729
URL: http://svnweb.freebsd.org/changeset/base/269729

Log:
  sed(1): Don't force a newline on last line, if input stream doesn't have one

  While here, change how we check if the current line is the last one.
  Before, we just checked if there were more files after the current one.
  Now, we check the actual content of those files: they files may not have
  a line at all. This matches the definition of the "last line" by the
  Open Group.

  The new behavior is closer to GNU sed.

  PR:        160745
  Phabric:    https://phabric.freebsd.org/D431
  Reviewed by:    jilles
  Approved by:    jilles
  Exp-run by:    antoine

Changes:
  head/usr.bin/sed/defs.h
  head/usr.bin/sed/main.c
  head/usr.bin/sed/process.c
  head/usr.bin/sed/tests/regress.y.out

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list