Page MenuHomeFreeBSD

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

Authored by cracauer on Nov 1 2024, 12:55 AM.
Tags
None
Referenced Files
F151200465: D47377.id146117.diff
Mon, Apr 6, 7:08 PM
Unknown Object (File)
Tue, Mar 24, 11:09 PM
Unknown Object (File)
Thu, Mar 19, 1:18 AM
Unknown Object (File)
Thu, Mar 12, 5:14 PM
Unknown Object (File)
Thu, Mar 12, 10:36 AM
Unknown Object (File)
Wed, Mar 11, 9:59 AM
Unknown Object (File)
Jan 6 2026, 3:54 AM
Unknown Object (File)
Dec 20 2025, 4:47 AM
Subscribers

Details

Summary

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--'

Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable