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
Unknown Object (File)
Tue, Apr 21, 6:36 PM
Unknown Object (File)
Mon, Apr 20, 4:48 AM
Unknown Object (File)
Wed, Apr 15, 1:29 AM
Unknown Object (File)
Sun, Apr 12, 2:21 AM
Unknown Object (File)
Mon, Apr 6, 7:08 PM
Unknown Object (File)
Mar 24 2026, 11:09 PM
Unknown Object (File)
Mar 19 2026, 1:18 AM
Unknown Object (File)
Mar 12 2026, 5:14 PM
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