[Bug 247931] sed "y" command bracket balancing check
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jul 12 12:09:32 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247931
Bug ID: 247931
Summary: sed "y" command bracket balancing check
Product: Base System
Version: 12.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: lhoursquentin at gmail.com
When using the "y" command, it seems like square bracket balancing is required.
Square brackets should instead be treated like any other character in the "y"
cmd context, as they are already at the time of doing the actual character
replacement:
sh$ echo | sed 'y/[/x/'
sed: 1: "y/[/x/": unbalanced brackets ([])
sh$ echo | sed 'y/[]/xy/'
sed: 1: "y/[]/xy/": unbalanced brackets ([])
sh$ echo | sed 'y/[a]/xyz/'
sh$ echo '][a' | sed 'y/[a]/xyz/'
zxy
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list