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: [email protected]
Reporter: [email protected]
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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"