[Bug 16285] New: sed -E Flag not working together with -i

bugzilla at busybox.net bugzilla at busybox.net
Wed Jan 29 08:32:22 UTC 2025


https://bugs.busybox.net/show_bug.cgi?id=16285

            Bug ID: 16285
           Summary: sed -E Flag not working together with -i
           Product: Busybox
           Version: 1.37.x
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
          Assignee: unassigned at busybox.net
          Reporter: hoffelmann at gmail.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

echo "foobar" | sed -E 's/(foo)/\1baz/' # working as expected (returns
"foobazbar")

echo "foobar" > test; sed -i -E 's/(foo)/\1baz/' test; cat test # working as
expected (returns "foobazbar")

echo "foobar" > test; sed -iE 's/(foo)/\1baz/' test; cat test # working not as
expected (returns "foobar")

echo "foobar" > test; sed -iE 's/\(foo\)/\1baz/' test; cat test # seems like
the -E flag is not active, should return "foobar" but returns "foobazbar"

echo "foobar" > test; sed -i 's/\(foo\)/\1baz/' test; cat test # working as
expected (returns "foobazbar")

--> When using the in-place flag (-i) the  extended regex flag (-E) is not
working

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list