[Bug 208554] usr.bin/sed :sed functions 'i' and 'a' discard leading white space

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Apr 5 16:27:07 UTC 2016


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

            Bug ID: 208554
           Summary: usr.bin/sed :sed functions 'i' and 'a' discard leading
                    white space
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: pfg at FreeBSD.org

Created attachment 169011
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=169011&action=edit
Patch from NetBSD

sed functions 'a' and 'i' discard leading white space of the inserted/appended
line(s) of text.
This comes from NetBSD's PR/49872

I have confirmed their test on FreeBSD:

(old sed)
pfg at gorilon:~/test % echo | sed -f test.sed | vis -l
test 2  \$
\$
test 1  \$
pfg at gorilon:~/test % vis -l < test.sed
a\134\$
   test 1  \$
 i\134\$
   test 2  \$
\$
(new sed)
pfg at gorilon:~/test % echo | sed -f test.sed | vis -l
   test 2  \$
\$
   test 1  \$
______
New behavior would be similar to GNU sed.

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


More information about the freebsd-bugs mailing list