HomeFreeBSD

sed: fix commandline-given expression when -e is not used

Description

sed: fix commandline-given expression when -e is not used

Make explicit sed commands (first on commandline) behave the same
as those given with -e.

Without this patch the following two commands behave differently,
the second one being wrong:
echo ab | sed -e $'1 i\\\n--'
echo ab | sed $'1 i\\\n--'

Reviewed by: 0mp, des, kevans
Sponsored by: Klara, Inc.

(cherry picked from commit 0552fdc62caf034397ffd5b07dfbad853aef5aa8)

Details

Provenance
cracauerAuthored on Nov 7 2024, 3:40 AM
kevansCommitted on Nov 22 2024, 4:51 AM
Parents
rG9431091ee021: release: Don't break if firmware install fails
Branches
Unknown
Tags
Unknown